{"id":19088,"date":"2021-12-06T09:23:37","date_gmt":"2021-12-06T03:53:37","guid":{"rendered":"https:\/\/tutorial.eyehunts.com\/?p=19088"},"modified":"2023-07-05T17:46:12","modified_gmt":"2023-07-05T12:16:12","slug":"python-sort-dict-by-value-descending-example-code","status":"publish","type":"post","link":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/","title":{"rendered":"Python sort dict by value descending | Example code"},"content":{"rendered":"\n<p>Use the operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at the index 1.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example sort dict by value descending in Python<\/strong><\/h2>\n\n\n\n<p>Simple example code. You have to <a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-import-module-from-path-example-code\/\">import <\/a>operator <a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-modules-import-custom-builtin-package\/\">module <\/a>to use the itemgetter method.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import operator\n\nd = {\"A\": 2, \"B\": 4, \"C\": 3, \"D\": 1, \"E\": 0}\n\nres = dict(sorted(d.items(), key=operator.itemgetter(1)))\n\nprint(res)\n<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"156\" src=\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg?resize=508%2C156&#038;ssl=1\" alt=\"Python sort dict by value descending\" class=\"wp-image-22925\"\/><\/figure><\/div>\n\n\n<p>Or use the <a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-reverse-order-example-code\/\">reverse attribute<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sorted_d = dict(sorted(d.items(), key=operator.itemgetter(1),reverse=True))<\/code><\/pre>\n\n\n\n<p>Or you can use the <code>sorted()<\/code> function along with a lambda function as the <code>key<\/code> parameter. Here&#8217;s an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my_dict = {'a': 3, 'b': 1, 'c': 2}\r\n\r\nsorted_dict = dict(sorted(my_dict.items(), key=lambda x: x&#91;1], reverse=True))\r\n\r\nprint(sorted_dict)\r<\/code><\/pre>\n\n\n\n<p>In the code above, <code>my_dict<\/code> is the original dictionary. The <code>sorted()<\/code> function is used with the <code>key<\/code> parameter set to a lambda function that takes each key-value pair (<code>x<\/code>) and returns the value (<code>x[1]<\/code>). The <code>reverse=True<\/code> argument is passed to sort the dictionary in descending order. Finally, the <code>dict()<\/code> function is used to convert the sorted list of tuples back into a dictionary.<\/p>\n\n\n\n<p>As a result, <code>sorted_dict<\/code> contains the sorted dictionary in descending order based on the values.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Do comment if you have any doubts or suggestions on this Python dict topic.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note:<\/strong> IDE:&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.jetbrains.com\/pycharm\/\" target=\"_blank\">PyCharm<\/a>&nbsp;2021.3.3 (Community Edition)<\/p><p>Windows 10<\/p><p><strong>Python 3.10.1<\/strong><\/p><p>All<strong>&nbsp;Python Examples&nbsp;are in&nbsp;Python&nbsp;3<\/strong>, so Maybe its different from python 2 or upgraded versions.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Use the operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at the index 1. Example sort dict by value descending in Python Simple example code. You have to import operator module to use the itemgetter method. Output: Or use the reverse attribute Or&hellip;&nbsp;<a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python sort dict by value descending | Example code<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[30],"tags":[101,203],"post_series":[],"class_list":["post-19088","post","type-post","status-publish","format-standard","hentry","category-python","tag-python-dictionary","tag-python-sort"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python sort dict by value descending | Example code<\/title>\n<meta name=\"description\" content=\"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python sort dict by value descending | Example code\" \/>\n<meta property=\"og:description\" content=\"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-06T03:53:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T12:16:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg\" \/>\n<meta name=\"author\" content=\"Rohit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rohit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\",\"url\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\",\"name\":\"Python sort dict by value descending | Example code\",\"isPartOf\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg\",\"datePublished\":\"2021-12-06T03:53:37+00:00\",\"dateModified\":\"2023-07-05T12:16:12+00:00\",\"author\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1\"},\"description\":\"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg?fit=508%2C156&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg?fit=508%2C156&ssl=1\",\"width\":508,\"height\":156},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tutorial.eyehunts.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python sort dict by value descending | Example code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#website\",\"url\":\"https:\/\/tutorial.eyehunts.com\/\",\"name\":\"Tutorial\",\"description\":\"By EyeHunts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorial.eyehunts.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1\",\"name\":\"Rohit\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971\",\"contentUrl\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971\",\"caption\":\"Rohit\"},\"description\":\"Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology &amp; like learning technical.\",\"url\":\"https:\/\/tutorial.eyehunts.com\/author\/rohit\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python sort dict by value descending | Example code","description":"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/","og_locale":"en_US","og_type":"article","og_title":"Python sort dict by value descending | Example code","og_description":"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...","og_url":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/","og_site_name":"Tutorial","article_published_time":"2021-12-06T03:53:37+00:00","article_modified_time":"2023-07-05T12:16:12+00:00","og_image":[{"url":"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg","type":"","width":"","height":""}],"author":"Rohit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rohit","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/","url":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/","name":"Python sort dict by value descending | Example code","isPartOf":{"@id":"https:\/\/tutorial.eyehunts.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage"},"image":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage"},"thumbnailUrl":"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg","datePublished":"2021-12-06T03:53:37+00:00","dateModified":"2023-07-05T12:16:12+00:00","author":{"@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1"},"description":"Use operator itemgetter method to sort dict by value descending in Python. operator.itemgetter(1) takes the value of the key which is at...","breadcrumb":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#primaryimage","url":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg?fit=508%2C156&ssl=1","contentUrl":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sort-dict-by-value-descending.jpg?fit=508%2C156&ssl=1","width":508,"height":156},{"@type":"BreadcrumbList","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dict-by-value-descending-example-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tutorial.eyehunts.com\/"},{"@type":"ListItem","position":2,"name":"Python sort dict by value descending | Example code"}]},{"@type":"WebSite","@id":"https:\/\/tutorial.eyehunts.com\/#website","url":"https:\/\/tutorial.eyehunts.com\/","name":"Tutorial","description":"By EyeHunts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorial.eyehunts.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1","name":"Rohit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/image\/","url":"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971","contentUrl":"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971","caption":"Rohit"},"description":"Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology &amp; like learning technical.","url":"https:\/\/tutorial.eyehunts.com\/author\/rohit\/"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":19776,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-list-of-dictionaries-example-code\/","url_meta":{"origin":19088,"position":0},"title":"Python sort list of dictionaries | Example code","author":"Rohit","date":"September 15, 2021","format":false,"excerpt":"Use lambda function with sorted() inbuilt function to sort the list of dictionaries in Python. Pass the list containing dictionaries and keys to the sorted method. Example sort list of dictionaries in Python A simple example code demonstrates the working of sorted() with lambda. We sort the list of dict\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Python-sort-list-of-dictionaries.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Python-sort-list-of-dictionaries.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Python-sort-list-of-dictionaries.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Python-sort-list-of-dictionaries.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Python-sort-list-of-dictionaries.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":8401,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-sort-dictionary-by-value-key-ascending-descending-order-examples\/","url_meta":{"origin":19088,"position":1},"title":"Python sort dictionary by Value\/Key | Ascending &#038; Descending order examples","author":"Rohit","date":"May 21, 2020","format":false,"excerpt":"You can sort a dictionary in python by using the sorted() function. it is actually possible to do a \"sort by dictionary values\".\u00a0 You could use: sorted(d.items(), key=lambda x: x[1]) This will sort the dictionary by the values of each entry within the dictionary from smallest to largest. Python sort\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":23475,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/","url_meta":{"origin":19088,"position":2},"title":"Python dictionary sum values with the same key | Example code","author":"Rohit","date":"December 18, 2021","format":false,"excerpt":"A list of dictionaries can have the same key with different or same values. Using reduce() function and + operator can sum values with the same key in the Python dictionary. You can't have the same key twice in the Python dictionary. Every key in the dictionary must be unique.\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python dictionary sum values with the same key","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":32874,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-countof-operator-method\/","url_meta":{"origin":19088,"position":3},"title":"Python countof() | Operator Method","author":"Rohit","date":"September 19, 2022","format":false,"excerpt":"The Python countof() method is used to return the number of elements in a that is equal to b. The method returns the number of elements in a that is equal to b. operator.countOf(a,\u00a0b) a: This is a list or a string. b: This is the element we are interested\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python countof() Operator Method","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2022\/09\/Python-countof-Operator-Method.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":19066,"url":"https:\/\/tutorial.eyehunts.com\/python\/sort-dictionary-by-value-python-example-code\/","url_meta":{"origin":19088,"position":4},"title":"Sort dictionary by value Python | Example code","author":"Rohit","date":"September 3, 2021","format":false,"excerpt":"Using two functions together: items() and sorted() can Sort dictionary by value in Python. The items() function allows you to retrieve the elements in a dictionary. And the combination with the sorted() function and a custom key parameter to sort a dictionary by value. x = {\"A\": 2, \"B\": 4,\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Sort dictionary by value Python","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/09\/Sort-dictionary-by-value-Python.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":35467,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-read-json-file-into-dict\/","url_meta":{"origin":19088,"position":5},"title":"Python read JSON file into dict","author":"Rohit","date":"January 13, 2023","format":false,"excerpt":"Use the json module loads method to read JSON files into dict in Python. JSON loads create a new dictionary with the key-value pairs of the JSON string and it returns this new dictionary. json.loads(data_JSON) Python read JSON files into dict example Simple example code load JSON from a File\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/01\/Python-read-JSON-file-into-dict.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/01\/Python-read-JSON-file-into-dict.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/01\/Python-read-JSON-file-into-dict.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/01\/Python-read-JSON-file-into-dict.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/01\/Python-read-JSON-file-into-dict.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/19088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/comments?post=19088"}],"version-history":[{"count":1,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/19088\/revisions"}],"predecessor-version":[{"id":40745,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/19088\/revisions\/40745"}],"wp:attachment":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/media?parent=19088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/categories?post=19088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/tags?post=19088"},{"taxonomy":"post_series","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/post_series?post=19088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}