Apr-23-2018, 11:25 PM
The problem is in line #9: you pass only one argument to
You code could be as follows:
.format
method, but 6 expected.You code could be as follows:
def line_up(roster): if not roster: print("There is no player in the list. \n") return for i, row in enumerate(roster): print("{:>2}{:10d}{:2d}{:2d}{:2d}{:2d} \n".format(i + 1, *row))
>>>line_up([[1,2,3,4,5], [2,3,4,5,6,7]])
Output: 1 1 2 3 4 5
2 2 3 4 5 6