{"id":4135,"date":"2022-01-26T18:29:39","date_gmt":"2022-01-26T18:29:39","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4135"},"modified":"2022-02-17T07:14:57","modified_gmt":"2022-02-17T07:14:57","slug":"multidimensional-lists","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/memory-python\/lists-python\/multidimensional-lists","title":{"rendered":"Multidimensional lists"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Create multidimension list<\/h4>\n\n\n\n<p>Python lists can contain a different list for any time, so you can create lists as nested as you like!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MyArray = &#91;&#91;\"abc\", 41], &#91;\"def\", 32], &#91;\"ghi\", 67], &#91;\"jkl\", 13]]\n\n\/\/Or\nMyArray = &#91;\n  &#91;\"abc\", 41],\n  &#91;\"def\", 32],\n  &#91;\"ghi\", 67],\n  &#91;\"jkl\", 13]\n]<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Access list items<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>print(MyArray&#91;2]&#91;1])<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Manipulate multidimensional lists<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Remove sub item<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>MyArray&#91;1].remove('Hi')<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create multidimension list Python lists can contain a different list for any time, so you can create lists as nested as you like! Access list items Manipulate multidimensional lists Remove sub item<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[325],"tags":[],"class_list":["post-4135","post","type-post","status-publish","format-standard","hentry","category-lists-python"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4135"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4135\/revisions"}],"predecessor-version":[{"id":4144,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4135\/revisions\/4144"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}