How to write list of strings to file, adding newlines?
Change
data.write(c + n)
to
data.write("%s%s\n" % (c, n))
A properly-placed data.write('\n')
will handle that. Just indent it appropriately for the loop you want to punctuate.
As other answers gave already pointed out, you can do it by appending a '\n' to c+n
or by using the format string "%s%s\n".
Just as a matter of interest, I think it would be more pythonic to use a list comprehension instead of two nested loops:
data.write("\n".join("%s%s"%(c,n) for c in s_chars for n in nums))