I don't get this one? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I don't get this one?

"Lists of lists are often used to represent 2D grids, as Python lacks the multidimensional arrays that would be used for this in other languages."

31st Mar 2019, 1:31 PM
abderrahmane boujendar
abderrahmane boujendar - avatar
2 Answers
+ 5
For example var1 = [ ["a", "b"], ["c", "d"], ["e", "f"]] Then var[0] is a list ["a", "b"] So var1[0][0] is "a" var1[0][1] is "b" Similarly var1[1][0] is "c" var1[1][1] is "d" Like this.
31st Mar 2019, 2:28 PM
Gordon
Gordon - avatar
+ 1
Tnk you so much
31st Mar 2019, 2:41 PM
abderrahmane boujendar
abderrahmane boujendar - avatar