摘要: 打开文件 help(open) open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) Character Meaning 'r' open for 阅读全文
posted @ 2017-09-08 23:59 110528844 阅读(153) 评论(0) 推荐(0) 编辑
摘要: >>> num = {} >>> type(num) <class 'dict'> >>> num2 = {1,2,3,4,5} >>> type(num2) <class 'set'> >>> num2 {1, 2, 3, 4, 5} >>> num2[1] Traceback (most rec 阅读全文
posted @ 2017-09-08 23:49 110528844 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 字典是python唯一的影射类型 hash >>> brand = ['李宁', '耐克', '阿迪达斯'] >>> slogan = ['一切皆有可能', 'Just do it','Impossible is nothing'] >>> print('李宁的口号是:',slogan[brand. 阅读全文
posted @ 2017-09-08 23:04 110528844 阅读(588) 评论(0) 推荐(0) 编辑