摘要: r模式: r只读模式:在文件不存在时报错,文件存在文件内指针直接跳到文件开头 with open('db.txt',mode='r',encoding='utf-8') as f: res=f.read() #会将文件的内容由硬盘全部读入内存,赋值给res print(res) inp_name=i 阅读全文
posted @ 2020-05-08 17:32 JXJing 阅读(160) 评论(0) 推荐(0)