📜  将文件的内容存储在变量中 python 代码示例

📅  最后修改于: 2022-03-11 14:47:16.179000             🧑  作者: Mango

代码示例1
with open('countries.txt','r') as file:
    countriesStr = file.read()
#######Yes, you can print it like a normal string