Created
September 22, 2019 10:51
-
-
Save goyalrohit/7053a0c43d85fb20a77cae6542a9d45a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#assign employee Id to list1 of size 5 | |
empId = ['1', '2', '3', '4', '5'] | |
#assign employee name to list2 of size 4 | |
empName = ['Tom', 'Maddy', 'Sam', 'John'] | |
#assign employee age to list3 of size 6 | |
empAge = [29, 30, 28, 32 ,33 , 34] | |
#zip the values | |
emp = zip(empId, empName , empAge) | |
#Prints the values in zip | |
print('\nValues in zip') | |
# prints tuple of shortest length | |
for values in emp: | |
print(values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment