快乐的老鼠 发表于 2017-4-26 09:13:16

python 写入多行

  1.
  >>> f=open('argv.py').read()
>>> open('test.log','w').write(f)
  2.
  f=open('test.py').readlines()
  >>> open('new.txt','w').writelines(f)
页: [1]
查看完整版本: python 写入多行