How can I write a 3D list to a text file with spaces and have the commas and speech marks removed

后端 未结 0 889
北荒
北荒 2020-12-14 07:47

This is the code I use:

with open(\'database.txt\', \'w\') as f:
    for item in booklist:
        f.write(\'%s\\n\' % item)
    f.close()

It

相关标签:
回答
  • 消灭零回复
提交回复
热议问题