How to append new data onto a new line

后端 未结 9 1749
一整个雨季
一整个雨季 2020-12-02 16:41

My code looks like this:

def storescores():

   hs = open(\"hst.txt\",\"a\")
   hs.write(name)
   hs.close() 

so if I run it and enter \"Ry

9条回答
  •  自闭症患者
    2020-12-02 17:15

    import subprocess
    subprocess.check_output('echo "' + YOURTEXT + '" >> hello.txt',shell=True)
    

提交回复
热议问题