What is the meaning of a[2][6] in python? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

What is the meaning of a[2][6] in python?

I got this doubt when I do challenge it is usually asked when it's related to lists

30th Apr 2018, 4:06 PM
Bala Krishnan V
Bala Krishnan V - avatar
5 Antworten
+ 3
a is a list of lists. a[2] is a's third list. a[2][6] is its 7th element
30th Apr 2018, 4:09 PM
VcC
VcC - avatar
+ 6
You should take lessons on Matrix also, things become easier for you.
30th Apr 2018, 5:09 PM
💞ⓢⓦⓐⓣⓘ💞
💞ⓢⓦⓐⓣⓘ💞 - avatar
+ 3
a[2][6] can be value of inner list or can be dict.
30th Apr 2018, 7:44 PM
Gyanamudra Behera
Gyanamudra Behera - avatar
+ 2
a =(1,2,3,4,5,6,7) a[2] = 3 a[6] = 7 a[2][6] doesn't give any output. It's better to write your code on playground to get actual result.
30th Apr 2018, 5:21 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 1
7th element of 3rd list element of list a[]
7th May 2018, 9:25 AM
Himanshu Goyal