not sure about this | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

not sure about this

list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]]) the ans is 8, yet, 1=0 1=1 2=2 3=3 4=5 why is the answer 8

3rd May 2018, 2:42 PM
Jack Gilbert
Jack Gilbert - avatar
1 Respuesta
+ 6
list[4] is 5, list[5] is 8 So list[list[4]] is 8 https://code.sololearn.com/c15v6aUPsb1J/?ref=app
3rd May 2018, 2:56 PM
jay
jay - avatar