随笔分类 -  python

摘要:1 import threading,time 2 3 def task(args): 4 time.sleep(1) 5 print(args) 6 7 for i in range(20): 8 t = threading.Thread(target=task,args=[i,]) 9 t.st 阅读全文
posted @ 2017-03-20 14:04 super-sos 阅读(204) 评论(0) 推荐(0)
摘要:1 class A: 2 camp = "A" 3 def __init__(self,name,gongji,shengming): 4 self.name = name 5 self.gongji = gongji 6 self.shengming = shengming 7 def attac 阅读全文
posted @ 2017-03-05 11:55 super-sos 阅读(200) 评论(0) 推荐(0)
摘要:编码 assic(只有英文及特殊字符) gb2312(6700) gbk(1995-21000) gb18030(27000) 万国码:unicode python2.x默认为assic编码 python3.x默认为utf-8编码 改变编码:#-*- coding:utf-8 -*- (告诉py解释 阅读全文
posted @ 2017-02-05 00:09 super-sos 阅读(296) 评论(0) 推荐(0)
摘要:字符串: 阅读全文
posted @ 2017-02-03 20:50 super-sos 阅读(182) 评论(0) 推荐(0)
摘要:变量命名规则: 1、只能是字母、数字、下划线任意组合 2、变量第一个字符不能是数字 3、以下关键字不能作为变量名: and、as、assert、break、class、continue、def、del、elif、else、except、exec、finally、 for、from、global、if 阅读全文
posted @ 2017-01-08 17:25 super-sos 阅读(198) 评论(0) 推荐(0)