+ 4

Solve this python trick no.2

hi everyone x=['apple','orange',['lichi','pineapple']] can you find the position of the pineapple in above list post your comment

11th Feb 2018, 9:26 AM
Maninder $ingh
Maninder $ingh - avatar
4 Antworten
11th Feb 2018, 10:57 AM
Louis
Louis - avatar
+ 9
print(x[2][1]) Then pineapple will gets displayed
11th Feb 2018, 9:45 AM
Abhivarshini Maddala
Abhivarshini Maddala - avatar
0
pineapple = x[2][1]
12th Feb 2018, 5:30 PM
Olanrewaju Yusuf
Olanrewaju Yusuf - avatar
- 1
t
12th Feb 2018, 11:58 AM
SULAIMAN IBRAHIM
SULAIMAN IBRAHIM - avatar