zip function in Python

The zip() function returns a zip object, which is an iterator of tuples where the each item in each passed iterator is paired together.

So basically the code:

friends = ["Rolf", "Bob", "Jen", "Anne"]
time_since_seen = [3, 7, 15, 11]

long_timers = {
  friends[i]: time_since_seen[i]
  for i in range(len(friends))
}
is equivalent to:
friends = ["Rolf", "Bob", "Jen", "Anne"]
time_since_seen = [3, 7, 15, 11]

long_timers = dict(zip(friends, time_since_seen))
If the passed iterators have different lengths, the iterator with the least items decides the length of the new iterator. Example:
friends = ["Rolf", "Bob", "Jen", "Anne"]
time_since_seen = [3, 7, 15, 11]
numbers = [1, 2, 3, 4, 5]

long_timers = list(zip(friends, time_since_seen, numbers))

print(long_timers)
Output - is basically a list of tuples with lenght of the least items list - 4:
[('Rolf', 3, 1), ('Bob', 7, 2), ('Jen', 15, 3), ('Anne', 11, 4)]