I have something like this (Python3):
for p in something:
for r in something_else:
print(r, end=" ")
but I want each last print in the inner loop to end with a newline to create a nice table. Is there some short and elegant way to do it?
Like this?
for p in something:
for r in something_else:
print("%s\t" % r, end=" ")
print()
More elegant might be
for p in something:
print(" ".join(map(str, something_else)))
Note that this will just print a table of the elements of something_else a bunch of times. What is in your list? How do you want the table to look? It might help if you're a little more specific in your question.
map(str, something_else) if it doesn't just contain strings.