+ 1

how to dynamically infer an element by array index?

2 3 index=int(input("Input number from 0 to 2")) list_movie={"Swim","Fight","Fly"} print(list_movie[index]) #How true write the line?

8th Feb 2020, 12:22 PM
đíđżĐéđŻđŞđ║ đĺđ░đ╗đÁđŻĐéđŞđŻ
đíđżĐéđŻđŞđ║ đĺđ░đ╗đÁđŻĐéđŞđŻ - avatar
2 Antworten
+ 2
index is not possible for set list_movie = [.....] not{... }
8th Feb 2020, 12:32 PM
Oma Falk
Oma Falk - avatar
+ 2
Jan Markus bist du wieder fit?
8th Feb 2020, 12:34 PM
Oma Falk
Oma Falk - avatar