+ 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 Answers
+ 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