I'm trying to print two variables with a for loop from two different lists with an equal amount of values, but when the lists have more than two values I get this error:
ValueError: too many values to unpack (expected 2)
Assume both name and surname lists are the same length (eg. name = ['m', 'y', '.', '.']
and surname = ['n', 'a', 'm', 'e']
)
for x,y in name,surname:
print(x,y)
My expected result is "my.." and "name" printed next to each other vertically.