运维网's Archiver
论坛
›
Python
› python print 重定向输入
sharpds77
发表于 2017-5-4 12:18:23
python print 重定向输入
将change.log内容追加到ab.py内
>>> t=open('ab.py','a')
>>> k=open('change.log').read()
>>> print(k,file=t)
r 读
w 写
a 追加
页:
[1]
查看完整版本:
python print 重定向输入