python3读取文件最简单的办法

file = open('test.txt') #读文件
s = file.read() #把文件放到字符串里面
print(s) #输出字符串
posted @ 2020-06-11 09:14  hh13579  阅读(668)  评论(0)    收藏  举报