摘要: with open('C:\Users\10224298\Desktop\桌面文件') as file_object:#with在不需要访问文件后将其关闭。 contents = file_object.read() print(contents.rstrip()) rstrip可以删除每行末尾的换 阅读全文
posted @ 2017-12-07 09:13 一天一进步 阅读(2952) 评论(0) 推荐(0) 编辑