The print
function already adds a newline for you, so if you just want to print followed by a newline, do (parens mandatory since this is Python 3):
print(a)
If the goal is to print the elements of a
each separated by newlines, you can either loop explicitly:
for x in a:
print(x)
or abuse star unpacking to do it as a single statement, using sep
to split outputs to different lines:
print(*a, sep="\n")
If you want a blank line between outputs, not just a line break, add end="\n\n"
to the first two, or change sep
to sep="\n\n"
for the final option.
\n
aftera
will improve the readability... maybe you want to print a new line after each combination? – Crestfallenfor combination in a: print(combination)
will do what you want. – Crestfallen