摘要:
# 打开文件(如果不存在则新建) 向其中写入 f = open('D:\\test.txt', 'w') f.write('hello world, i am here!') f.close() print("-" * 30) # 分割线 # 读取文件 f = open('D:\\test.txt', 'r') content = f.read(5) # 最多读取5个数据 print(co... 阅读全文
posted @ 2018-08-15 20:11
青衫仗剑
阅读(350)
评论(0)
推荐(0)

浙公网安备 33010602011771号