0

Pls someone should help me explain this code.

https://code.sololearn.com/cC4M596KVbzU/?ref=app

5th Oct 2020, 7:20 PM
Pe Tex
Pe Tex - avatar
4 Respuestas
+ 8
List indexing start from zero abc = [1,3,5,6,2,7,4] abc[4]=2 abc[2]=5 abc[5]=7 print(abc[abc[abc[4]]]) print(abc[abc[2]]) print(abc[5]) print(7) first Output 7 my_list = [1,9,3,5,8,3,3,6,1,8] print(my_list[my_list[4]]) Here my_list[4]=8 print(my_list[8]) print(1) So Output 1 Complete Output 7 1
5th Oct 2020, 7:43 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 4
Start from inside to outside abc = [1,3,5,6,2,7,4] print(abc[abc[abc[4]]]) #Explanation: First :print(abc[abc[2]]) Second:print(abc[5]) Output:7 my_list = [1,9,3,5,8,3,3,6,1,8] print(my_list[my_list[4]]) Do like what i do for the first list Output:1
5th Oct 2020, 7:45 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
♨️♨️ Thanks alot
6th Oct 2020, 10:11 AM
Pe Tex
Pe Tex - avatar
+ 1
Muhammad Thanks alot
6th Oct 2020, 10:11 AM
Pe Tex
Pe Tex - avatar