Python Enumerate
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