{"id":23475,"date":"2021-12-18T15:11:51","date_gmt":"2021-12-18T09:41:51","guid":{"rendered":"https:\/\/tutorial.eyehunts.com\/?p=23475"},"modified":"2023-09-13T18:54:28","modified_gmt":"2023-09-13T13:24:28","slug":"python-dictionary-sum-values-with-the-same-key-example-code","status":"publish","type":"post","link":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/","title":{"rendered":"Python dictionary sum values with the same key | Example code"},"content":{"rendered":"\n<p>A list of dictionaries can have the same key with different or same values. Using <a href=\"https:\/\/tutorial.eyehunts.com\/js\/reduce-function-in-javascript-example-code\/\">reduce() function<\/a><strong> and <a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-operators-overview-examples\/\">+ operator<\/a><\/strong> can sum values with the same key in the Python dictionary.<\/p>\n\n\n\n<p>You can&#8217;t have the same key twice in the Python dictionary. Every key in the dictionary must be unique. Read the <a href=\"https:\/\/docs.python.org\/3.6\/library\/stdtypes.html#dict\">documentation<\/a>. (If a key occurs more than once, the last value for that key becomes the corresponding value in the new dictionary.)<\/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\">Python dictionary sum values with the same key example<\/h2>\n\n\n\n<p>Simple example code.<\/p>\n\n\n\n<p>For this example, you have to <a href=\"https:\/\/tutorial.eyehunts.com\/python\/how-to-import-module-in-python-example-code\/\">import <\/a>the <strong>functools <\/strong><a href=\"https:\/\/tutorial.eyehunts.com\/python\/types-of-modules-in-python-basics\/\">module<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import collections\nimport functools\nimport operator\n\nmy_dict = &#91;{'a': 5, 'b': 1, 'c': 2},\n           {'a': 2, 'b': 5},\n           {'a': 10, 'c': 10}]\n\n# sum the values with same keys\nres = dict(functools.reduce(operator.add,\n                            map(collections.Counter, my_dict)))\n\nprint(\"New dict : \", 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=\"481\" height=\"127\" src=\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?resize=481%2C127&#038;ssl=1\" alt=\"Python dictionary sum values with the same key\" class=\"wp-image-23484\"\/><\/figure><\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Or use the counter method<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import collections\n\nmy_dict = &#91;{'a': 5, 'b': 1, 'c': 2},\n           {'a': 2, 'b': 5},\n           {'a': 10, 'c': 10}]\n\ncounter = collections.Counter()\nfor d in my_dict:\n    counter.update(d)\n\nres = dict(counter)\n\nprint(\"New dict : \", res)\n<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong>: New dict : {&#8216;a&#8217;: 17, &#8216;b&#8217;: 6, &#8216;c&#8217;: 12}<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Comment if you have any doubts or suggestions on this Python sum dictionary code.<\/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>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&#8217;t have the same key twice in the Python dictionary. Every key in the dictionary must be unique. Read the documentation. (If a&hellip;&nbsp;<a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python dictionary sum values with the same key | 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,271],"post_series":[],"class_list":["post-23475","post","type-post","status-publish","format-standard","hentry","category-python","tag-python-dictionary","tag-python-sum"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python dictionary sum values with the same key | Code<\/title>\n<meta name=\"description\" content=\"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different\" \/>\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-dictionary-sum-values-with-the-same-key-example-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python dictionary sum values with the same key | Code\" \/>\n<meta property=\"og:description\" content=\"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-18T09:41:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-13T13:24:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.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-dictionary-sum-values-with-the-same-key-example-code\/\",\"url\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/\",\"name\":\"Python dictionary sum values with the same key | Code\",\"isPartOf\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg\",\"datePublished\":\"2021-12-18T09:41:51+00:00\",\"dateModified\":\"2023-09-13T13:24:28+00:00\",\"author\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1\"},\"description\":\"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?fit=481%2C127&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?fit=481%2C127&ssl=1\",\"width\":481,\"height\":127},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tutorial.eyehunts.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python dictionary sum values with the same key | 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=1777979855\",\"contentUrl\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777979855\",\"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 dictionary sum values with the same key | Code","description":"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different","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-dictionary-sum-values-with-the-same-key-example-code\/","og_locale":"en_US","og_type":"article","og_title":"Python dictionary sum values with the same key | Code","og_description":"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different","og_url":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/","og_site_name":"Tutorial","article_published_time":"2021-12-18T09:41:51+00:00","article_modified_time":"2023-09-13T13:24:28+00:00","og_image":[{"url":"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.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-dictionary-sum-values-with-the-same-key-example-code\/","url":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/","name":"Python dictionary sum values with the same key | Code","isPartOf":{"@id":"https:\/\/tutorial.eyehunts.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage"},"image":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage"},"thumbnailUrl":"https:\/\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg","datePublished":"2021-12-18T09:41:51+00:00","dateModified":"2023-09-13T13:24:28+00:00","author":{"@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1"},"description":"Use reduce() + operator to sum values with the same key in the Python dictionary. A list of dictionaries can have the same key with different","breadcrumb":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#primaryimage","url":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?fit=481%2C127&ssl=1","contentUrl":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-dictionary-sum-values-with-the-same-key.jpg?fit=481%2C127&ssl=1","width":481,"height":127},{"@type":"BreadcrumbList","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-sum-values-with-the-same-key-example-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tutorial.eyehunts.com\/"},{"@type":"ListItem","position":2,"name":"Python dictionary sum values with the same key | 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=1777979855","contentUrl":"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777979855","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":23707,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-sum-dictionary-values-by-key-example-code\/","url_meta":{"origin":23475,"position":0},"title":"Python sum dictionary values by key | Example code","author":"Rohit","date":"December 23, 2021","format":false,"excerpt":"Use the Collection module counter function to sum dictionary values by key in Python. The counter is a sub-class that is used to count hashable objects and count each of the elements present in the container. Example sum dictionary values by key in Python A simple example code has two\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python sum dictionary values by key","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sum-dictionary-values-by-key.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":23488,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-sum-list-of-dictionary-values-example-code\/","url_meta":{"origin":23475,"position":1},"title":"Python sum list of dictionary values | Example code","author":"Rohit","date":"December 23, 2021","format":false,"excerpt":"Use sum() and values() functions to sum a list of dictionary values dictionary in Python. But before that, you have to combine all the same keys add those keys' values, and make one dictionary. Example sum list of dictionary values in Python A simple example code sum up all the\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python sum list of dictionary values","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Python-sum-list-of-dictionary-values.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":23441,"url":"https:\/\/tutorial.eyehunts.com\/python\/write-a-python-program-to-sum-all-the-items-in-a-dictionary-example-code\/","url_meta":{"origin":23475,"position":2},"title":"Write a Python program to sum all the items in a dictionary | Example code","author":"Rohit","date":"December 18, 2021","format":false,"excerpt":"Use the for loop or sum() function to make a Python program to sum all the items in a dictionary. In both methods you have to use the values() function to get the value of the dictionary. Python program to sum all the items in a dictionary Simple example code\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Write a Python program to sum all the items in a dictionary","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/12\/Write-a-Python-program-to-sum-all-the-items-in-a-dictionary.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":33507,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-not-in-dictionary\/","url_meta":{"origin":23475,"position":3},"title":"Python not in dictionary","author":"Rohit","date":"July 19, 2023","format":false,"excerpt":"In Python, the not in keyword is used to check whether a key or value is present in a dictionary or any other iterable. It is typically used in combination with the in keyword to perform membership tests. For dictionaries, you can use not in to check if a specific\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\/07\/Python-not-in-dictionary-1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":22223,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-iterate-dictionary-key-value-example-code\/","url_meta":{"origin":23475,"position":4},"title":"Python iterate dictionary key-value | Example code","author":"Rohit","date":"November 15, 2021","format":false,"excerpt":"Simple for loop is enough to iterate dictionary key-value in Python. Get a key and use those keys to access its value of it. key is just a variable name that will simply loop over the keys in the dictionary, rather than the keys and values. for key in dict1:\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python iterate dictionary key-value","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/11\/Python-iterate-dictionary-key-value.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":18599,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-dictionary-methods\/","url_meta":{"origin":23475,"position":5},"title":"Python dictionary methods","author":"Rohit","date":"July 17, 2023","format":false,"excerpt":"Python dictionary methods are built-in functions that can be called on dictionary objects to perform various operations. These methods provide a way to manipulate, access, and modify dictionaries in Python. Some common dictionary methods include: clear(): Removes all key-value pairs from the dictionary. my_dict.clear() copy(): Returns a shallow copy of\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\/07\/Python-dictionary-methods.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/07\/Python-dictionary-methods.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/07\/Python-dictionary-methods.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2023\/07\/Python-dictionary-methods.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/23475","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=23475"}],"version-history":[{"count":1,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/23475\/revisions"}],"predecessor-version":[{"id":41912,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/23475\/revisions\/41912"}],"wp:attachment":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/media?parent=23475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/categories?post=23475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/tags?post=23475"},{"taxonomy":"post_series","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/post_series?post=23475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}