首页 > 其他分享 >一、输出print

一、输出print

时间:2022-09-21 19:44:06浏览次数:49  
标签:fp 输出 文件 ## file print

一、输出内容

1、输出数字

2、字符串

print('  ')

print(" ")

3、。。。

二、输出地点

1、控制台

2、输出到文件中

fp=open('D:/text1.text','a+')##如果文件不存在就创建,存在就在文件内容后面追加
print('111111',file=fp)
fp.close()

指定盘符、使用"file="
如果不换行输出,则print('hello','world','python')

标签:fp,输出,文件,##,file,print
From: https://www.cnblogs.com/djbd-0323/p/16716924.html

相关文章