Python Open a txt file without clearing everything in it?

后端 未结 4 1999
孤城傲影
孤城傲影 2020-12-07 02:38
file = io.open(\'spam.txt\', \'w\')
file.write(u\'Spam and eggs!\\n\')
file.close()

....(Somewhere else in the code)

file = io.open(\'spam.txt\', \'w\')
file.write         


        
4条回答
提交回复
热议问题