摘要: 显示颜色 Print a string that starts a color/style, then the string, then end the color/style change with '\033[0m': 这样就可以输出 Success! 显示颜色格式:\033[显示方式;字体色; 阅读全文
posted @ 2017-08-10 11:40 FlyInDance 阅读(4500) 评论(0) 推荐(0) 编辑
摘要: 集合 定义: S=set(). 注意S={}为字典类型 求两个列表的公共部分 1 集合内可以有多个元素,但是每个元素都必须是不可变类型,即可hash类型2 集合内的元素唯一3 集合是无序的s={1,'a',1,1,1,1,1,1}#本质 s=set({1,'a',1,1,1,1,1,1}) 集合优先 阅读全文
posted @ 2017-08-10 10:52 FlyInDance 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 字典 定义: D={}. 逗号分隔元素, 元素为key:value对. info={'name':'PatHoo','age':18,'sex':'male'}#本质 info=dict({'name':'PatHoo','age':18,'sex':'male'}) #字典的key必须是不可变类型 阅读全文
posted @ 2017-08-10 10:20 FlyInDance 阅读(144) 评论(0) 推荐(0) 编辑