Created
October 24, 2021 23:38
-
-
Save tkoki/3942e5e90f2459e8d13b252ac7ac2130 to your computer and use it in GitHub Desktop.
Pythonで複数のリストの要素とインデックスを同時に取得する
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
lista = [1, 2, 3] | |
listb = ['a', 'b', 'c'] | |
for idx, (la, lb) in enumerate(zip(lista, listb)): | |
print(idx, la, lb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment