Lists & loops
Easy
Zip two lists
Pair items from parallel lists and iterate them together.
How it works
zip(a, b) stops at the shorter sequence — handy when lists are the same length.
Unpack with for x, y in zip(...) or convert to a list of tuples for inspection.
Useful for combining names with scores, keys with values, or CSV columns.
names = ["Ada", "Grace", "Katherine"]
scores = [98, 95, 100]
for name, score in zip(names, scores):
print(f"{name}: {score}")
print(list(zip(names, scores)))
Sponsored
Sponsored
Reserved space — layout preview until AdSense is connected