摘要: 1、读、写、追加文件 读:打开文件 r 读写:r+ 写:w 可写不可读 清空原文件 写读:w+ 清空文件 追加:a+ 可以读写,文件不存在自动创建 练习读txt文件类容: #-*- coding : utf-8 -*-file = open(r'C:\\Users\Administrator\Pyc 阅读全文
posted @ 2019-12-20 14:59 宽崽 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 1、列表 格式: L = [1,2,3,5] M = [7,8,9] print(type(L)) -> :list 列表增加元素: print(L.append(10)) -> :[1,2,3,5,10] 列表指定位置插入元素:L.insert(3,4) print(L) -> [1,2,3,4, 阅读全文
posted @ 2019-12-20 14:17 宽崽 阅读(265) 评论(0) 推荐(0) 编辑