摘要: open(filename,model,encode) f=open('log.txt') data=f.read() f.close() print(data) read(num):若为普通打开方式,num为读取指定数目字符的个数 模式: r:只读模式 w:只写模式,不存在则创建,存在则清空 x: 阅读全文
posted @ 2018-03-05 17:23 sonofthesea 阅读(124) 评论(0) 推荐(0) 编辑
摘要: li=[1,211,22,33,423] new_li=sorted(li) li.sort() print(new_li) print(li) 阅读全文
posted @ 2018-03-05 14:28 sonofthesea 阅读(72) 评论(0) 推荐(0) 编辑