2019年11月21日

python-多线程

摘要: 通过用threading模块的Thread类创建线程 创建线程常用的两个参数:target和args target表示线程要运行的函数名,不需要加括号'()' args表示target的函数所需的入参,类型时元组'(xxx,)',函数无入参时该参数可省略 import time import thr 阅读全文

posted @ 2019-11-21 20:07 「枫」 阅读(121) 评论(0) 推荐(0) 编辑

2019年2月14日

全国城市拼音对照表

摘要: 全国城市拼音对照表 阅读全文

posted @ 2019-02-14 15:14 「枫」 阅读(5509) 评论(0) 推荐(0) 编辑

2019年1月19日

python3编码转换

摘要: 1 a='我很好' #python3 默认的编码为unicode 2 print('我是a',a,type(a)) #打印结果: 3 #把a转成gb2312 4 a_gb2312=a.encode('gb2312') #默认是unicode所以不需要decode(),直接encode成想要转换的编码gb2312 5 print('我是gb23... 阅读全文

posted @ 2019-01-19 15:53 「枫」 阅读(281) 评论(0) 推荐(0) 编辑

导航