+ 2

what is this code mean?

list = [1ļ¼Œ1ļ¼Œ2ļ¼Œ3ļ¼Œ5ļ¼Œ8ļ¼Œ13] printļ¼ˆlist [list [4]]ļ¼‰ I don't know the line 2, nesting of two list

30th Mar 2018, 9:10 AM
Petter Aaron
Petter Aaron - avatar
1 Answer
+ 8
It means take the list item indexed 4 (the number 5) and use it as an index indicator. list[4] == 5, so: list[list[4]] == list[5] == 8
30th Mar 2018, 9:23 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar