python文件读取小案例三

对文本中的内容进行读取 file = open('my file.txt','r') content = file.read() print(content) 结果: 列表形式的读取 file = open('my file.txt','r') content = file.readlines() print(content) 结果:
相关文章
相关标签/搜索