Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
if list[4]=5 list[list[4]] is the same as list[5] and list[5]=6
22nd Feb 2020, 11:21 PM
Helena
Helena - avatar
+ 4
inner list: list[4] is 5. (index of outer list) outer list: list[5] is 6.
22nd Feb 2020, 9:33 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Ben Rückert = list[list[4]] at index 4 value is 5 so list[4] = 5 = list[5] // now here index will be 5 = 6
22nd Feb 2020, 10:29 PM
A͢J
A͢J - avatar
+ 2
understanding that list[4]=5 and that list[5]=6 just replace 5 with list[4] and you get list[list[4]]=list[5]=6
23rd Feb 2020, 8:25 AM
Helena
Helena - avatar
+ 1
Ben Rückert normally you have this: list[index] list[0], list[1] and so on but in your case the index is also a value from the list index = list[4] = 5 list[index] = list[5] = 6
23rd Feb 2020, 9:16 AM
Denise Roßberg
Denise Roßberg - avatar