How to write list of strings to file, adding newlines?

前端 未结 9 1384
借酒劲吻你
借酒劲吻你 2020-12-31 09:02
def generator():
    nums = [\'09\', \'98\', \'87\', \'76\', \'65\', \'54\', \'43\']
    s_chars = [\'*\', \'&\', \'^\', \'%\', \'$\', \'#\', \'@\',]

    data =         


        
9条回答
  •  天涯浪人
    2020-12-31 09:42

    A properly-placed data.write('\n') will handle that. Just indent it appropriately for the loop you want to punctuate.

提交回复
热议问题