python练习——文件输入输出与异常

1.读取文件 with open('learning_python.txt') as file_object: context = file_object.read() print(context) with open('learning_python.txt') as file_object: #遍历对象 for line in file_object: print(line.r
相关文章
相关标签/搜索