I'm trying to print a formatted horizontal list after a prompt. This is what I've tried:
def displayList(prompt, list_):
print(f"{prompt:>20}:",*list_, sep = f"{'':>4}")
but when displaying multiple lists on top of each other I get this:
List 1: 6 2 4 8 4
List 2: 6 3 5 9 1
Added List: 12 5 9 17 5
Multpilied List: 36 6 20 72 4
but I want this:
List 1: 5 4 8 6 4
List 2: 4 9 10 1 2
Added List: 9 13 18 7 6
Multpilied List: 20 36 80 6 8