Last active
December 27, 2019 16:38
-
-
Save edenau/34fabb07f38dde6b186724f85bd1e7b8 to your computer and use it in GitHub Desktop.
Python Enumerate
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
upperCase = ['A', 'B', 'C', 'D', 'E', 'F'] | |
lowerCase = ['a', 'b', 'c', 'd', 'e', 'f'] | |
for i, (upper, lower) in enumerate(zip(upperCase, lowerCase), 1): | |
print(f'{i}: {upper} and {lower}.') | |
# 1: A and a. | |
# 2: B and b. | |
# 3: C and c. | |
# 4: D and d. | |
# 5: E and e. | |
# 6: F and f. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment