{"id":329313,"date":"2023-10-05T06:11:06","date_gmt":"2023-10-05T06:11:06","guid":{"rendered":"https:\/\/pythonguides.com\/?p=18532"},"modified":"2023-10-05T06:11:06","modified_gmt":"2023-10-05T06:11:06","slug":"python-dictionary-extend-complete-tutorial4-examples","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2023\/10\/05\/python-dictionary-extend-complete-tutorial4-examples\/","title":{"rendered":"Python dictionary extend \u2013 Complete tutorial[4+ examples]"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<p>In this <a href=\"https:\/\/pythonguides.com\/python-hello-world-program\/\"  aria-label=\"Python tutorial (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Python tutorial<\/a>, we will discuss the <strong>Python dictionary extend. <\/strong>Here we will also cover the below examples: <\/p>\n<ul>\n<li>Python dictionary extend vs append<\/li>\n<li>Python dictionary extend list<\/li>\n<li>Python extend dictionary class<\/li>\n<li>Python dictionary extend function<\/li>\n<li>Python extend dictionary with another<\/li>\n<li>Python dictionary extend vs update <\/li>\n<\/ul>\n<div class=\"adthrive-video-player in-post\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\" data-video-id=\"uJsBdbVl\" data-player-type=\"default\" override-embed=\"default\">\n\t\t\t<meta itemprop=\"uploadDate\" content=\"2022-10-01T14:30:06.000Z\" \/><br \/>\n\t\t<meta itemprop=\"name\" content=\"How to extend a Dictionary in Python\" \/><br \/>\n\t\t<meta itemprop=\"description\" content=\"Learn how to extend a dictionary in Python\" \/><br \/>\n\t\t<meta itemprop=\"thumbnailUrl\" content=\"https:\/\/content.jwplatform.com\/thumbs\/uJsBdbVl-720.jpg\" \/><br \/>\n\t\t<meta itemprop=\"contentUrl\" content=\"https:\/\/content.jwplatform.com\/videos\/uJsBdbVl.mp4\" \/>\n\t<\/div>\n<h2 class=\"wp-block-heading\" id=\"python-dictionary-extend\">Python dictionary extend<\/h2>\n<ul>\n<li>In this program, we will see <strong>how to extend a dictionary in Python<\/strong>.<\/li>\n<li>In Python, the <strong>dict.update()<\/strong> will help the user to extend a dictionary with the key-value pair from one dictionary to another.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<p>Let&#8217;s take an example and check how to extend a <a href=\"https:\/\/pythonguides.com\/create-a-dictionary-in-python\/\"  aria-label=\"dictionary in Python (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">dictionary in Python<\/a>.<\/p>\n<pre class=\"wp-block-code\"><code>my_dict1 = {\"james\": 18, \"potter\": 67}\n\nnew_dictionary = {\"George\": 12, \"Micheal\": 91}\nmy_dict1.update(new_dictionary)\nprint(my_dict1)<\/code><\/pre>\n<p>In the above example first, we initialize two dictionaries<strong> &#8216;my_dict1&#8217;<\/strong> and <strong>&#8216;new_dictionary&#8217; <\/strong>which contain elements in the form of key-value pair.<\/p>\n<p>Now we have to use <strong>dict.update()<\/strong> method to extend the dictionary into another one.<\/p>\n<p>Here is the execution of the following given code<\/p>\n<pre class=\"wp-block-code\"><code>{'james': 18, 'potter': 67, 'George': 12, 'Micheal': 91}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" fetchpriority=\"high\" width=\"677\" height=\"386\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-dict-expansion.jpg\" alt=\"python dict expansion\" class=\"wp-image-45699\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-dict-expansion.jpg 677w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-dict-expansion-300x171.jpg 300w\" sizes=\"(max-width: 677px) 100vw, 677px\" title=\"python dict\"><figcaption class=\"wp-element-caption\">Python dictionary extend<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"how-to-extend-a-dictionary-in-python\">How to extend a dictionary in Python<\/h2>\n<p>By using the <strong>**<\/strong> operator we can perform this particular task and this method adds the specified dictionary elements to the end of the current dictionary.<\/p>\n<p><strong>Source Code:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>my_dict = {'m': 51, 'q': 82}\nz = {'k': 10, 'u': 14}\n\nd = {**my_dict, **z}\nprint(d)<\/code><\/pre>\n<p><strong>Output:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>{'m': 51, 'q': 82, 'k': 10, 'u': 14}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"431\" height=\"388\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/Python-dictionary-extend.jpg\" alt=\"Python dictionary extend\" class=\"wp-image-45700\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/Python-dictionary-extend.jpg 431w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/Python-dictionary-extend-300x270.jpg 300w\" sizes=\"(max-width: 431px) 100vw, 431px\" title=\"Python dictionary\"><figcaption class=\"wp-element-caption\">Python dictionary extend<\/figcaption><\/figure>\n<\/div>\n<p>This is how to <strong>extend a dictionary in Python<\/strong>.<\/p>\n<h2 class=\"wp-block-heading\" id=\"python-dictionary-extend-vs-append\">Python dictionary extend vs append<\/h2>\n<ul>\n<li>In Python dictionary, the <strong>append()<\/strong> function is used to add elements to the keys in the dictionary. In the dictionary extend() means to concatenate the first dictionary with another dictionary.<\/li>\n<li>In Python dictionary, the append() function is used to add elements to the keys in the dictionary. In the dictionary extend() means to concatenate the first dictionary with another dictionary.<\/li>\n<li>In this program, we will learn about the<strong> update()<\/strong> function and check how to add elements to a given dictionary. In a Python dictionary, the update() function is used to update the dictionary with the elements in the form of a Key-value pair from another dictionary.<\/li>\n<li>In Python dictionary, append can be used by list as a list, we can also use the <strong>&#8220;+&#8221;<\/strong> operator to append the lists of each key within a dictionary.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<p>Let&#8217;s an example and check the combination of the <strong>update()<\/strong> and <strong>append()<\/strong> functions in a Python dictionary<\/p>\n<pre class=\"wp-block-code\"><code>student_name = {'Micheal':178, 'George':923}\nadd_new = {'Potter':236}\n\nstudent_name.update(add_new)\nprint(\"Update elements\",student_name)\n\nnew_country = {'Germany': 'France'}\nnew_country&#091;'Germany'] = &#091;8]\nnew_country&#091;'Germany'].append('France')\nprint(\"Append elements\",new_country)<\/code><\/pre>\n<p>After writing the above code, you will see first we initialize a dictionary that stores key-value pair elements. Here the <strong>update()<\/strong> function is used to add the element in the dictionary and call the print statement to display the output.<\/p>\n<p>After that create another dictionary and use the append function to insert the elements in the dictionary.<\/p>\n<p>Here is the execution of the following given code<\/p>\n<pre class=\"wp-block-code\"><code>Update elements {'Micheal': 178, 'George': 923, 'Potter': 236}\r\nAppend elements {'Germany': &#091;8, 'France']}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"543\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-expand-dict.jpg\" alt=\"python expand dict\" class=\"wp-image-45701\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-expand-dict.jpg 739w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-expand-dict-300x220.jpg 300w\" sizes=\"(max-width: 739px) 100vw, 739px\" title=\"python expand dict\"><figcaption class=\"wp-element-caption\">Python dictionary extend vs append<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">Python dictionary extend list<\/h2>\n<ul>\n<li>Here we can see how to update the value list in a Python dictionary.<\/li>\n<li>By using the list comprehension method we can update the value list to extract a particular key and then iterate over its value in this method.<\/li>\n<\/ul>\n<p><strong>Source Code:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>stud_dictionary = {'student_id' :678, 'student_val' : &#091;9,2,1], 'age' : 19}\n\nstud_dictionary&#091;'student_val'] = &#091;y * 4 for y in stud_dictionary&#091;'student_val']]\nprint(\"Updated dictionary:\",stud_dictionary)<\/code><\/pre>\n<p>In the above code, once you will print <strong>&#8220;stud_dictionary&#8221;<\/strong> then the result will display as a<strong> &#8220;student_val&#8221;:[36,8,4].<\/strong> In this program, the<strong> &#8220;*&#8221; <\/strong>operator is used to update the values from a list. You can check the below screenshot for updating the value list.<\/p>\n<p><strong>Output:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>Updated dictionary: {'student_id': 678, 'student_val': &#091;36, 8, 4], 'age': 19}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"360\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-python-dictionary.jpg\" alt=\"extend python dictionary\" class=\"wp-image-45702\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-python-dictionary.jpg 953w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-python-dictionary-300x113.jpg 300w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-python-dictionary-768x290.jpg 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" title=\"extend python dictionary\"><figcaption class=\"wp-element-caption\">Python dictionary extend the list<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"python-extend-dictionary-class\">Python extend dictionary class<\/h2>\n<ul>\n<li>In this program, we will see how to extend a Python dictionary class whose instances will keep the data contained by their element in the form of a key-value pair.<\/li>\n<li>In this example, we can apply the subclasses like dict and use built-in keywords like <strong>&#8216;self&#8217; and &#8216;super&#8217;.<\/strong><\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>class my_new_dict(dict):\n    def __init__(self, *b, **a):\n        super(my_new_dict,self).__init__(*b, **a)\n        self.itemlist = super(my_new_dict,self).keys()\n    def __setitem__(self, new_k, new_va):\n    \n        set(self.itemlist).add(new_k)\n        super(my_new_dict,self).__setitem__(new_k, new_va)\n    def __iter__(self):\n        return iter(self.itemlist)\n\n \nnew_val = my_new_dict(m=4,z=7)\nprint(\"original dictionary:\",new_val)\nnew_val&#091;'u']=15\nnew_val&#091;'w']=19\nprint (\"Updated dictionary:\",new_val)<\/code><\/pre>\n<p><strong>Note:<\/strong> In this example <strong>dict.keys() <\/strong>method does not return a list so we apply the &#8216;<strong>self. item list&#8217; <\/strong>method.<\/p>\n<p>In the above code, once you print &#8220;new_val&#8221; then the output will display as a &#8216;{&#8216;m&#8217;:4,&#8217;z&#8217;:7,&#8217;u&#8217;:8}&#8217;. In this program, we use the function &#8216;_init_&#8217; in which we have assigned<strong> &#8216;self&#8217; and &#8216;*args&#8217;<\/strong> as an argument.<\/p>\n<p>Here is the implementation of the following code:<\/p>\n<pre class=\"wp-block-code\"><code>original dictionary: {'m': 4, 'z': 7}\r\nUpdated dictionary: {'m': 4, 'z': 7, 'u': 15, 'w': 19}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"800\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-a-dictionary-python.jpg\" alt=\"extend a dictionary python\" class=\"wp-image-45703\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-a-dictionary-python.jpg 735w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/extend-a-dictionary-python-276x300.jpg 276w\" sizes=\"(max-width: 735px) 100vw, 735px\" title=\"extend a dictionary python\"><figcaption class=\"wp-element-caption\">Python extend dictionary class<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"python-dictionary-extend-function\">Python dictionary extend function<\/h2>\n<p><strong>Note:<\/strong> In the Python dictionary, there is no built-in extend() function which we can apply in a dictionary. So in this case we can apply the<strong> update ()<\/strong> function and it will help the user to update the dictionary with the elements in the form of a key-value pair from another dictionary.<\/p>\n<h2 class=\"wp-block-heading\" id=\"python-extend-dictionary-with-another\">Python extend dictionary with another<\/h2>\n<ul>\n<li>Let us see how to <strong>add a dictionary with another dictionary in Python<\/strong>. <\/li>\n<li>By using the<strong> ** <\/strong>operator we can solve this task and this method inserts the specified dictionary elements in the form of a key-value pair to the end of the current dictionary.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>my_new_org_dict = {'John': 782, 'Micheal': 173}\nupdate_dict = {'George': 192, 'oliva': 967}\n\nnew_val = {**my_new_org_dict, **update_dict}\nprint(new_val)<\/code><\/pre>\n<p><strong>Output:<\/strong> In the above code first, we will initialize a dictionary called<strong> &#8216;my_new_org_dict&#8217; <\/strong>that stores elements and then use another dictionary<strong> &#8216;update_dict&#8217;.<\/strong><\/p>\n<p>Now in this program, we use the operator &#8216;**&#8217; for appending elements. Here we can see that the dictionary is added to another dictionary.<\/p>\n<pre class=\"wp-block-code\"><code>{'John': 782, 'Micheal': 173, 'George': 192, 'oliva': 967}<\/code><\/pre>\n<p>You can refer to the below screenshot:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"385\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/how-to-extend-a-dictionary-in-python.jpg\" alt=\"how to extend a dictionary in python\" class=\"wp-image-45704\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/how-to-extend-a-dictionary-in-python.jpg 696w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/how-to-extend-a-dictionary-in-python-300x166.jpg 300w\" sizes=\"(max-width: 696px) 100vw, 696px\" title=\"how to extend a dictionary in python\"><figcaption class=\"wp-element-caption\">Python extend dictionary with another<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"python-dictionary-extend-vs-update\">Python dictionary extend vs update<\/h2>\n<ul>\n<li>Here we will discuss the difference between the extend and update method in Python.<\/li>\n<li>In Python, there is no extend() function in the dictionary but we can apply this method in lists and tuples. In Python, the <strong>update() <\/strong>function is used to modify the dictionary and by using this method we can concatenate the old dictionary to a new dictionary.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong><\/p>\n<pre class=\"wp-block-code\"><code>my_new_dict = {'Mongodb':800,'Sql':892,'C++':956}\n\nprint(\"NewLanguages\",my_new_dict)\nmy_new_dict.update({'java':300,'Pascal':890})\nprint(\"updated language\",my_new_dict)<\/code><\/pre>\n<p>Here is the Output of the following given code:<\/p>\n<pre class=\"wp-block-code\"><code>NewLanguages {'Mongodb': 800, 'Sql': 892, 'C++': 956}\r\nupdated language {'Mongodb': 800, 'Sql': 892, 'C++': 956, 'java': 300, 'Pascal': 890}<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"413\" src=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-extend-dictionary-with-another.jpg\" alt=\"python extend dictionary with another\" class=\"wp-image-45705\" srcset=\"https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-extend-dictionary-with-another.jpg 977w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-extend-dictionary-with-another-300x127.jpg 300w, https:\/\/pythonguides.com\/wp-content\/uploads\/2021\/09\/python-extend-dictionary-with-another-768x325.jpg 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" title=\"python extend dictionary with another\"><figcaption class=\"wp-element-caption\">Python dictionary extend vs update<\/figcaption><\/figure>\n<\/div>\n<p>In this Python tutorial, we will discuss the <strong>Python dictionary extend. <\/strong>Here we will also cover the below examples: <\/p>\n<ul>\n<li>Python dictionary extend vs append<\/li>\n<li>Python dictionary extend list<\/li>\n<li>Python extend dictionary class<\/li>\n<li>Python dictionary extend function<\/li>\n<li>Python extend dictionary with another<\/li>\n<li>Python dictionary extend vs update <\/li>\n<\/ul>\n<p><strong>Related Posts:<\/strong><\/p>\n<ul>\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/pythonguides.com\/python-dictionary-values-to-list\/\"  rel=\"noreferrer noopener\" class=\"rank-math-link\">Python dictionary values to list<\/a><\/li>\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/pythonguides.com\/python-dictionary-contains\/\"  rel=\"noreferrer noopener\" class=\"rank-math-link\">Python dictionary contains<\/a><\/li>\n<li><a href=\"https:\/\/pythonguides.com\/iterate-through-dictionary-python\/\"  aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Iterate through dictionary Python<\/a><\/li>\n<li><a aria-label=\" (opens in a new tab)\" class=\"rank-math-link\" href=\"https:\/\/pythonguides.com\/python-dictionary-comprehension\/\"  rel=\"noreferrer noopener\">Python dictionary comprehension<\/a><\/li>\n<li><a href=\"https:\/\/numpy.org\/doc\/stable\/user\/c-info.how-to-extend.html\"  data-type=\"link\" data-id=\"https:\/\/numpy.org\/doc\/stable\/user\/c-info.how-to-extend.html\" rel=\"noreferrer noopener\">How to extend NumPy<\/a><\/li>\n<\/ul>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>In this Python tutorial, we will discuss the Python dictionary extend. Here we will also cover the below examples: Python dictionary extend Example: Let\u2019s take an example and check how to extend a dictionary in Python. In the above example first, we initialize two dictionaries \u2018my_dict1\u2019 and \u2018new_dictionary\u2019 which contain elements in the form of &#8230; <a title=\"Python dictionary extend \u2013 Complete tutorial[4+ examples]\" class=\"read-more\" href=\"https:\/\/pythonguides.com\/python-dictionary-extend\/\" aria-label=\"More on Python dictionary extend \u2013 Complete tutorial[4+ examples]\">Read more&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":2034,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Python dictionary extend \u2013 Complete tutorial[4+ examples] - ITTeacherITFreelance.hk","description":"In this Python tutorial, we will discuss the Python dictionary extend. Here we will also cover the below examples: Python dictionary extend Example: Let\u2019s take"},"footnotes":""},"categories":[10700],"tags":[10762,10761],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329313"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/2034"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=329313"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329313\/revisions"}],"predecessor-version":[{"id":329314,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329313\/revisions\/329314"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=329313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=329313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=329313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}