ZIP Mehrere Listen
# zip multiple lists
names = [ ' tim ', ' joe ' , ' billy ', ' sally ' ]
ages = [ 21, 19, 18, 43 ]
eye_color = [ ' blue ' , ' brown ' , ' brown ' , ' green ']
print(list(zip(names, ages, eye_color))) # return list of tuples [ ( ' tim ', 21 , ' blue ' ), ( ' joe ' , 19 , ' brown '), ( ' billy ', 18, ' brown ' ), ( ' sally ', 43 , ' green ' )]
for name, age in zip( names, ages ) :
if age > 20 :
print(name) # tim sally
Impossible Impala