Use zip function in for loop : Zip : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Zip »

 

Use zip function in for loop


names = ['A''B''C''D'
ages = [124532102

for name, age in zip(names, ages)
    print name, 'is', age, 'years old'



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Function
» Zip