获取您自己的 Python 服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
f = open("demofile2.txt", "a") f.truncate(20) f.close() #open and read the file after the truncate: f = open("demofile2.txt", "r") print(f.read())
您好!欢迎来到 de