+ 1
list=[1,1,2,3,4,5,6,7] print(list[list[4]])
Output along with explanation please 🙏
6 Antworten
+ 1
Try answering these questions.
1. What is list[4]?
2. Which type is list[4]?
3. Can I put complex expressions inside array indexing?
Once answered, you may gain some more insight of what follows.
+ 1
yes now i understood...thanks a lot 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 🙂🙂🙂🙂
0
list=[1,1,2,3,5,8,13]
print(list[list[4]])
i got 8 as an output here...why not 5???