fp=open('E:/text.txt','a+')#a+ 如果文件不存在就创建,存在就在文件后继续追加
print('hello world',file=fp)
fp.close
#数据放文件,指定盘,使用file= 才能写入
输出数字,
print(520)
不换行输出
print('hello','world','hhhhhhh')

fp=open('E:/text.txt','a+')#a+ 如果文件不存在就创建,存在就在文件后继续追加
print('hello world',file=fp)
fp.close
#数据放文件,指定盘,使用file= 才能写入
输出数字,
print(520)
不换行输出
print('hello','world','hhhhhhh')