0

L=[1,1,3,8,6] print(L[L[4]])

List

8th Sep 2019, 2:17 AM
Yogendra Yadav
Yogendra Yadav - avatar
4 Answers
+ 3
It will give error 'list index out of bound' as in L=[1,1,3,8,6] L[L[4]] means L[6] but max index is 4 in list L
8th Sep 2019, 4:08 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
IndexError: list index out of range. L[4] is 6, but L[6] is out of range.
8th Sep 2019, 4:04 AM
Diego
Diego - avatar