I am quite new to Python and I am now struggling with formatting my data nicely for printed output.
I have one list that is used for two headings, and a matrix that
Some ad-hoc code:
row_format ="{:>15}" * (len(teams_list) + 1) print(row_format.format("", *teams_list)) for team, row in zip(teams_list, data): print(row_format.format(team, *row))
This relies on str.format() and the Format Specification Mini-Language.