实例1:
1 file_name = input('请输入需要打开的文件名:') 2 file = open(file_name) 3 print('文件的内容是:') 4 for each_line in file: 5 print(each_line) 6 file.close()
Python标准异常总结
以下是 Python 内置异常类的层次结构:
标签:入门,Python,print,file,032,line,异常 From: https://www.cnblogs.com/ybqjymy/p/17650483.html