I have two Lists:
team1 = ['Vàlentine', 'Consus', 'Never Casual ', 'NucIear', 'Daltwon']
team2 = ['The Aviator', 'Iley', 'Nisquick', 'Dragoon', 'WAACK']
And I want to display the contents of these lists as follows:
team1(bold) team2(bold)
Valentine The Aviator
Consus Iley
Never Casual Nisquick
Nuclear Dragoon
Daltwon WAACK
And I'd want the code to be able to work with multiple lists.
I've currently tried this piece of code, which almost works, but I'm not sure how to configure it so that the columns after the first column are aligned.
L = [team1,team2]
max_length = max(map(len, L)) # finding max length
output = zip(*map(lambda x: x + [' '] * (max_length - len(x)), L)) # filling every sublist with ' ' to max_length and then zipping it
for i in output: print(*i, sep= ' ')
output:
Valentine The Aviator
Consus Iley
Never Casual Nisquick
NucIear Dragoon
Daltwon WAACK