Python List slice | Sololearn: Learn to code for FREE!

0

Python List slice

Could anyone please kindly explain why this output is 8? list = [1, 1, 2, 3, 5, 8, 13] Print(list[list[4]])

9/5/2021 2:03:16 PM

YokoS

2 Answers

New Answer

+5

easy!!! decompose in parts!! list[4] prints 5 list[5] prints 8

0

Thank you for the explanation. I understand :)