Enumerate
The place you'll see tuples the most is in the enumerate
function. Instead of having to choose between iterating over the index or the value, you can get both at once.
my_list = ['a', 'b', 'c']
for i, val in enumerate(my_list):
print(f"Index: {i}, Value: {val}")
Index: 0, Value: a
Index: 1, Value: b
Index: 2, Value: c