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."
2 Antworten
+ 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.
+ 1
Tnk you so much