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
相關文章
相關標籤/搜索