摘要: 1.div{ text-transform: capitalize;/*英字与英字首字母大写*/ word-spacing: 20px;/*英字与英字间隔*/ letter-spacing: 50px;/*字与字间隔*/ text-indent: 20px; /*首行缩进*/ background- 阅读全文
posted @ 2020-02-22 22:36 cuizero0 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1.服务端 from socket import * import selectors sel=selectors.DefaultSelector() def accept(server_fileobj,mask): conn,addr=server_fileobj.accept() sel.reg 阅读全文
posted @ 2020-02-22 22:33 cuizero0 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 一、_thread 1.参考类型: _thread.start_new_thread ( function, args[, kwargs] ) function - 线程函数。 args - 传递给线程函数的参数,他必须是个tuple类型。 kwargs - 可选参数 2.参考代码: import 阅读全文
posted @ 2020-01-31 17:16 cuizero0 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1.将excel里的有效数据提取出来 import xlrd import os path="text" #创建文件“text” def readexcel(): dable=xlrd.open_workbook('考生号码.xls') #打开excel table=dable.sheets()[0 阅读全文
posted @ 2020-01-26 17:29 cuizero0 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 一、1.while循环语句的用法while 条件: 子代模块2.while语法说明 函数名为while循环判断条件,当值为True时,继续执行子代码;当值为False时,终止循环。 3.嵌套a,b=0,2while a<=0: while a<b: print("%s"%((a+1)*b)) b-= 阅读全文
posted @ 2020-01-26 16:11 cuizero0 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 常见状态码200 成功300 多种选择400 错误请求404 未找到405 方法禁用500 服务器内部错误(1)1开头的http状态码100 继续101 切换协议(2)2开头的http状态码200 成功201 请求成功并服务器创建了新的资源202 接受请求但没创建资源203 返回另一资源的请求204 阅读全文
posted @ 2019-12-21 11:20 cuizero0 阅读(194) 评论(0) 推荐(0) 编辑
摘要: (一)变量名 1.只能是一个词。2.只能包含字母、数字和下划线。3.不能以数字开头。4.尽量以描述包含的数据内容。5.不要使用python函数名或关键字。 (二)print()函数 1.功能:打印2.print(''):让计算机无需理解,原样复述引号中的内容3.print():让计算机读懂括号里的内 阅读全文
posted @ 2019-12-18 16:38 cuizero0 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 9.31 爬取百度 import urllib.request response=urllib.request.urlopen('http://www.baidu.com')print(response.read().decode('utf-8')) 爬取 10.1 10.2 Python 爬虫架构 阅读全文
posted @ 2019-10-12 20:05 cuizero0 阅读(97) 评论(0) 推荐(0) 编辑
摘要: ale=["a","b","c"] you=["a","e","s"] f=set(ale) g=set(you) set把列表放到集合里去 交集:interscetion print(f.intersection g) print(f&g) 并集:union print(f.union g) pr 阅读全文
posted @ 2019-08-30 17:52 cuizero0 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 运算器 2018-12-11 00:45:43 24 1.+ - * /除 **幂 %取余数 / /取整数 2.判断一个值或东西是否在另一个整体里 if ,,, not in ,,, if,,,in,,, 例: 例: a=(“b” “c”) a=(“b” “c”) if“b”not in a if“ 阅读全文
posted @ 2019-08-30 00:25 cuizero0 阅读(140) 评论(0) 推荐(0) 编辑