Create multidimension list

Python lists can contain a different list for any time, so you can create lists as nested as you like!

MyArray = [["abc", 41], ["def", 32], ["ghi", 67], ["jkl", 13]]

//Or
MyArray = [
  ["abc", 41],
  ["def", 32],
  ["ghi", 67],
  ["jkl", 13]
]

Access list items

print(MyArray[2][1])

Manipulate multidimensional lists

Remove sub item
MyArray[1].remove('Hi')
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *