zip
allows you to aggregate elements from each of the iterables. However, if the iterables are not the same length, the remaining elements of the longer iterables are not paired, potentially leading to unnoticed bugs.
Starting with Python 3.10, using the strict keyword argument with zip
raises a ValueError
if the lengths of the iterables are unequal.