Created
March 23, 2020 09:30
-
-
Save frankhn/0cbe16f044753ae79e95b4a2eaeedc7b 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
number_list = [1, 2, 3] | |
str_list = ['one', 'two', 'three'] | |
classes = ['middle', 'high', 'junior'] | |
# No iterables are passed | |
# result = zip() | |
# Converting itertor to list | |
# result_list = list(result) | |
# print(result_list) | |
# Two iterables are passed | |
result = zip(number_list, str_list, classes) | |
# Converting itertor to set | |
# result_set = set(result) | |
print(list(result)) | |
for number, string_, class_ in zip(number_list, str_list, classes): | |
print(number, string_, class_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment