# 1.打开文件(文件名区分大小写)
file = open("readme", encoding="utf-8")
# 2.读取文件
text = file.read()
print(text)
# 3.关闭文件
file.close()
python读取文件
最新推荐文章于 2024-07-06 00:50:12 发布
# 1.打开文件(文件名区分大小写)
file = open("readme", encoding="utf-8")
# 2.读取文件
text = file.read()
print(text)
# 3.关闭文件
file.close()