获取您的
Python
服务器
×
改变方向
改变主题,深色/浅色
前往 Spaces
f = open("demofile3.txt", "w") f.write("Woops! I have deleted the content!") f.close() #open and read the file after the overwriting: f = open("demofile3.txt", "r") print(f.read())
糟糕!我删除了内容!