{"id":522,"date":"2013-12-17T21:31:01","date_gmt":"2013-12-17T20:31:01","guid":{"rendered":"http:\/\/it4bus.vn\/blog\/?p=522"},"modified":"2014-08-08T18:53:15","modified_gmt":"2014-08-08T16:53:15","slug":"array-list-etc-voi-chi-muc-la-chuoi","status":"publish","type":"post","link":"https:\/\/www.itersdesktop.com\/vi\/2013\/12\/17\/array-list-etc-voi-chi-muc-la-chuoi\/","title":{"rendered":"Array, List, etc. v\u1edbi ch\u1ec9 m\u1ee5c l\u00e0 chu\u1ed7i k\u00ed t\u1ef1"},"content":{"rendered":"<p><\/p>\n<div>V\u00ed d\u1ee5: T\u1ea1o m\u1ed9t danh s\u00e1ch v\u1edbi c\u00e1c ph\u1ea7n t\u1eed s\u1eed d\u1ee5ng ch\u1ec9 m\u1ee5c l\u00e0 chu\u1ed7i. Ki\u1ec3u d\u1eef li\u1ec7u n\u00e0y th\u01b0\u1eddng \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Associative_array\" target=\"_blank\">m\u1ea3ng k\u1ebft h\u1ee3p<\/a>. Trong <a href=\"http:\/\/www.python.org\" target=\"_blank\">Python<\/a>, ch\u00fang ta c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u1ea5u tr\u00fac d\u1eef li\u1ec7u t\u1eeb \u0111i\u1ec3n (<a href=\"http:\/\/docs.python.org\/tutorial\/datastructures.html#dictionaries\" target=\"_blank\">Dictionaries<\/a>) v\u00e0 khai b\u00e1o nh\u01b0 sau:<\/div>\n<div>\n<pre>reactions = {\"Vac_c\":{\"IntMeta\",33}, \"Vac_f\":{\"IntMeta\",12},\"Gln_in\":{\"ExtMeta\",20}}<\/pre>\n<\/div>\n<div>\u0110\u00e2y l\u00e0 <a href=\"http:\/\/stackoverflow.com\/questions\/3765533\/python-array-with-string-indices\" target=\"_blank\">m\u1ed9t c\u00e2u h\u1ecfi tr\u00ean Stackoverflow<\/a>.<\/div>\n<div>M\u1ed9t v\u00e0i h\u00ecnh \u1ea3nh minh h\u1ecda cho tr\u01b0\u1eddng h\u1ee3p associative array.<\/div>\n<div>\n<figure id=\"attachment_1661\" aria-describedby=\"caption-attachment-1661\" style=\"width: 416px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1661 size-full\" src=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2014\/08\/associativearray.png\" alt=\"Associative Array\" width=\"416\" height=\"147\" srcset=\"https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2014\/08\/associativearray.png 416w, https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2014\/08\/associativearray-300x106.png 300w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><figcaption id=\"caption-attachment-1661\" class=\"wp-caption-text\">Associative Array<\/figcaption><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1744 size-full\" src=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/php_associativearray.jpg\" alt=\"php_associativearray\" width=\"600\" height=\"389\" srcset=\"https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/php_associativearray.jpg 600w, https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/php_associativearray-300x194.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/div>\n<div><\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1745 size-large\" src=\"http:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/associativemaps02-1024x242.png\" alt=\"associativemaps02\" width=\"620\" height=\"146\" srcset=\"https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/associativemaps02-1024x242.png 1024w, https:\/\/www.itersdesktop.com\/wp-content\/uploads\/2013\/12\/associativemaps02-300x71.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/div>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Trong l\u1eadp tr\u00ecnh, ch\u00fang ta c\u0169ng hay g\u1eb7p nhi\u1ec1u tr\u01b0\u1eddng h\u1ee3p ph\u1ea3i t\u1ea1o m\u1ed9t danh m\u1ee5c m\u00e0 index c\u1ee7a n\u00f3 l\u00e0 c\u00e1c chu\u1ed7i k\u00ed t\u1ef1. C\u00f3 m\u1ed9t kh\u00e1i ni\u1ec7m \u0111\u1ec3 m\u00f4 t\u1ea3 lo\u1ea1i \u0111\u1ed1i t\u01b0\u1ee3ng n\u00e0y, th\u01b0\u1eddng g\u1ecdi l\u00e0 HashMap hay HashTable.<\/p>\n","protected":false},"author":2,"featured_media":1745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[334,348,230,122],"tags":[349,350,347,123],"class_list":["post-522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-science","category-data-structures","category-programming","category-python","tag-array","tag-index","tag-list","tag-python-language"],"_links":{"self":[{"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/posts\/522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/comments?post=522"}],"version-history":[{"count":16,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/posts\/522\/revisions"}],"predecessor-version":[{"id":1755,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/posts\/522\/revisions\/1755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/media\/1745"}],"wp:attachment":[{"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/media?parent=522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/categories?post=522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itersdesktop.com\/vi\/wp-json\/wp\/v2\/tags?post=522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}