def generator(): nums = [\'09\', \'98\', \'87\', \'76\', \'65\', \'54\', \'43\'] s_chars = [\'*\', \'&\', \'^\', \'%\', \'$\', \'#\', \'@\',] data =
This one works for me
with open(fname,'wb') as f: for row in var: f.write(repr(row)+'\n')