51
Dev开发社区
首页
文章
问答
工具
搜索
登录
注册
#Python数据分析与挖掘实战
python 多进程并发接口测试实例
#encoding=utf-8import requestsimport jsonimport osimport hashlibprint "register------"data = json.dumps({'username': 'li...
代码星球
·
2021-02-12
python
进程
并发
接口
测试
python 练习用python六剑客实现一个统计数字的个数,六剑客:(map、lambda、reduce、filter、切片、推到列表)
统计一共有几个数字 s="sdfa45ads46723" #lambda >>>filter(lambdax:x.isdigit(),list(s))['4','5','4','6','7','2','3']>>>len(filter(lambdax:x...
代码星球
·
2021-02-12
python
剑客
习用
实现
一个
python excel操作 练习-#操作单列 #操作A到C列 #操作1到3行 #指定一个范围遍历所有行和列 #获取所有行 #获取所有列
##操作单列#操作A到C列#操作1到3行#指定一个范围遍历所有行和列#获取所有行#获取所有列 #coding=utf-8 fromopenpyxlimportWorkbookwb=Workbook()ws1=wb.activews1["A1"]=1ws1["A2"]=2ws1["A3"]=3&nbs...
代码星球
·
2021-02-12
操作
有行
获取
python
excel
python excel操作单元格复制和读取的两种方法
操作单元格新建一个sheet,单元格赋值(两种方法)单元格A1赋值为’xiaxiaoxu’单元格A2赋值为‘xufengchai’ 打印A1和A2单元格的值(两种方法) #coding=utf-8 fromopenpyxlimportWorkbookwb=Workbook()w...
代码星球
·
2021-02-12
python
excel
操作
单元格
复制
python excel操作 练习:#生成一个excel文件,生成3个sheet,每个sheet的a1写一下sheet的名称。每个sheet有个底色
练习:#生成一个excel文件,生成3个sheet,每个sheet的a1写一下sheet的名称。每个sheet有个底色#coding=utf-8 fromopenpyxlimportWorkbookwb=Workbook()ws1=wb.create_sheet('sheet1',0)ws2=wb.creat...
代码星球
·
2021-02-12
sheet
excel
生成
每个
python
python excel练习:新建sheet、修改名称、设定颜色、打印sheet名称,复制,保存
练习:新建一个sheet设定一个sheet的插入位置修改sheet的名称为‘xiaxiaoxu’设定该sheet的背景标签的颜色获取全部sheet的名称,打印每个sheet的名称copy一个sheet修改copy的sheet的名称为‘xufegnchai‘保存excel为‘d:\sample.xlsx’#coding=...
代码星球
·
2021-02-12
sheet
名称
python
excel
练习
python selenium第一个WebDriver脚本
#coding=utf-8fromseleniumimportwebdriverimporttimeimportosos.environ["webdriver.firefox.driver"]="C:ProgramFilesMozillaFirefoxfirefox.exe"driver=webdriver.Firef...
代码星球
·
2021-02-12
python
selenium
第一个
WebDriver
脚本
python 文件操作,os.path.walk()的回调函数打印文件名
#coding=utf-8importosdeffind_file(arg,dirname,files): #foriinarg: #printi forfileinfi...
代码星球
·
2021-02-12
python
文件
操作
os.path.walk
回调
python 文件操作 练习:取得文件的最后存取时间
#coding=utf-8importosimporttimefile_atime=int(os.path.getatime('d:\a.txt'))print"file_atime:",file_atimetime_arr=time.localtime(file_atime)print'time_arr:',time...
代码星球
·
2021-02-12
文件
python
操作
练习
取得
python 文件操作 练习:把一个目录下的所有文件名,打印一下,不要包含后缀名
#coding=utf-8importosos.chdir('d:\test2')file_list=os.listdir('.')print"file_list:",file_listprint"*"*100forfileinfile_list: printos.path.split...
代码星球
·
2021-02-12
python
文件
操作
练习
一个
python excel操作
excel操作#coding=utf-8fromopenpyxlimportWorkbookwb=Workbook() #创建文件对象 #grabtheactiveworksheetws=wb.active #获取第一个sheet...
代码星球
·
2021-02-12
python
excel
操作
python 线程、多线程
复习进程知识:python:主进程,至少有一个主线程启动一个新的子进程:Process,pool给每一个进程设定一下执行的任务:传一个函数+函数的参数如果是进程池:map函数:传入一个任务函数+一个序列启动:start多进程执行的时候:如果主进程退出了,子进程还在执行如何让主进程等待子进程执行完毕再退出:调用join函...
代码星球
·
2021-02-12
线程
python
python pip list 命令列出所有安装包和版本信息
c:Python27Scripts>piplistDEPRECATION:Thedefaultformatwillswitchtocolumnsinthefuture.Youcanuse--format=(legacy|columns)(ordefineaformat=(legacy|columns)inyour...
代码星球
·
2021-02-12
python
pip
list
命令
列出
python xml练习:从database.xml文件取databaselist的ip、name、passwd,写入列表
xml:<?xmlversion='1.1'encoding='utf-8'?><!--thisisatestaboutxml--><databaselisttype='oracle'> <databaseuserArea='suzhou'&g...
代码星球
·
2021-02-12
python
xml
练习
database.xml
文件
python xml childNodes,childNodes[1].childNodes[0].data例子
xml:<?xmlversion='1.0'encoding='utf-8'?><!--thisisatestaboutxml--><booklisttype='scicenceandenginerring'> <bookcategory='m...
代码星球
·
2021-02-12
childNodes
python
xml
.childNodes
.data
首页
上一页
...
45
46
47
48
49
...
下一页
尾页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他