python
find_element_by_id
这个作者很懒,什么都没留下…
展开
-
线程
#coding=utf-8import threadingimport timeexitFlag=0# 定义对象# 继承父类threading.Threadclass myThread(threading.Thread): #初始化 def __init__(self,threadID,name,counter): threading.Thread....转载 2018-08-23 15:42:08 · 134 阅读 · 0 评论 -
list字段
list=['mo','ya','mei']#删除最后的一个,并打印出来print(list.pop())#添加list.append('jia')#中介的第三个位置添加list.insert(2,'00')#尾部提交list.extend(['jia','you'])print(list)li = ['server=mpilgrim', 'uid=sa', 'datab...原创 2018-10-16 16:09:10 · 403 阅读 · 0 评论 -
python 冒泡
list=[5,3,19,8]for i in range(len(list)-1): for j in range(len(list)-1-i): if list[j]>list[j+1]: #交换位置 list[j],list[j+1]=list[j+1],list[j]print(list)原创 2018-10-18 20:09:43 · 96 阅读 · 0 评论 -
python 练习题
#coding:utf-8import cmathimport randomclass practise: def __init__(self): print("hello world!") def sumtest(self,a,b): # 数字求和 c=a+b print('数字{0},加上{1}等于:{2}...原创 2018-10-08 10:57:59 · 310 阅读 · 0 评论 -
pytest 安装
第一步安装pip3 install -U pytest第二步查看版本pip3 show pytest第三步小试牛刀原创 2018-09-21 19:54:01 · 1571 阅读 · 0 评论 -
Scrapy 实现搜索资料功能
第一步安装:pip3 install Scrapy第二步创建项目scrapy startproject tutorial第3步查看项目结构第4步:进入项目目录下执行爬虫scrapy crawl name文中原创 2018-09-27 10:58:19 · 714 阅读 · 0 评论 -
python 创建线程
# -*- coding:UTF-8 -*-import _threadimport time # 为线程定义一个函数def print_time(threadName,delay): count=0 while count<5: time.sleep(delay) count+=1 print("%s:%s"%(t...转载 2018-08-21 18:31:30 · 116 阅读 · 0 评论 -
python 报 import thread ModuleNotFoundError: No module named 'thread'
原因:是python 3.5以上导入线程的重命名为_thread原创 2018-08-21 16:03:34 · 4178 阅读 · 0 评论 -
python 计算1+2+3+4+5+......+1000的值
sum=0for i in range(1,1001):sum=sum+iprint(sum)原创 2018-10-26 14:20:14 · 9540 阅读 · 0 评论