def generator(): nums = [\'09\', \'98\', \'87\', \'76\', \'65\', \'54\', \'43\'] s_chars = [\'*\', \'&\', \'^\', \'%\', \'$\', \'#\', \'@\',] data =
Change
data.write(c + n)
to
data.write("%s%s\n" % (c, n))