1、打开txt文件. Note=open('x.txt',mode='w') 复制. 函数=open(x.扩展名,mode=模式) · 2、向文件中写入数据. 第一种写入方式:. write 写入. Note. · 3、关闭文件.
確定! 回上一頁