獲取您自己的 Python 伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
f = open("demofile2.txt", "a") f.write("Now the file has more content!") f.close() #open and read the file after the appending: f = open("demofile2.txt", "r") print(f.read())
你好!歡迎來到 demofile2.txt
此檔案僅用於測試目的。
祝你好運!現在檔案有了更多內容!