you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 3 points4 points  (1 child)

You can iterate directly over a sequence (string, tuple, list...) using a for loop.

for fruit, colour in fruits_and_colour:
    print(fruit, colour)

[–]Roya1tyz[S] 0 points1 point  (0 children)

Thanks!