# 获得文件对象 读模式
f = open("abc.txt", "r", encoding="utf8")
# 读取内容
content = f.read()
# 关闭文件
f.close()
# 输出内容
print(content)
python IO 读取文件abc.txt的内容 并且打印输出
阅读 47
2023-03-16
# 获得文件对象 读模式
f = open("abc.txt", "r", encoding="utf8")
# 读取内容
content = f.read()
# 关闭文件
f.close()
# 输出内容
print(content)
相关推荐
精彩评论(0)