<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhojanapuanand on Medium]]></title>
        <description><![CDATA[Stories by Bhojanapuanand on Medium]]></description>
        <link>https://medium.com/@bhojanapuanand32?source=rss-2386d08e79e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1s38zMdmQzbKugnS</url>
            <title>Stories by Bhojanapuanand on Medium</title>
            <link>https://medium.com/@bhojanapuanand32?source=rss-2386d08e79e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:14:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhojanapuanand32/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Python Dictionaries: A Complete Guide For Beginers]]></title>
            <link>https://medium.com/@bhojanapuanand32/python-dictionaries-a-complete-guide-for-beginers-d5f9f9cb8507?source=rss-2386d08e79e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5f9f9cb8507</guid>
            <category><![CDATA[python-dictionary-method]]></category>
            <dc:creator><![CDATA[Bhojanapuanand]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 17:12:18 GMT</pubDate>
            <atom:updated>2026-06-25T17:12:18.264Z</atom:updated>
            <content:encoded><![CDATA[<p>A Dictionary is a data structure that stores data in the form of <strong>Key-value pairs, </strong>making it easy to access,update,amd manage information.</p><p>This article explores the Fundamentals of python dictionaries,their features and operations.</p><h4><strong>Introduction</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nYT5RoAjabcq96P-wNH0vA.png" /><figcaption>Figure:1: Introduction of Python Dictionaries</figcaption></figure><p>By the end of this article ,the reader the reader would be able to understand</p><ul><li>What is dictionary</li><li>How to create a dictionary</li><li>Dictionary methods</li><li>Realtime Applications of Dictionary</li><li>Conclusion</li></ul><h4><strong>What is Dictionary?</strong></h4><p>Dictionary is a data structure that store data in the form of <strong>Key-value pairs, </strong>where each key is used to access its corresponding value quickly and modify them.</p><ul><li>Dictionaries are written in curly braces{}.</li><li>in dictionaries keys will not alloe the duplicates and values will allow the duplicates.</li></ul><h4><strong>why use of dictionaries?</strong></h4><ul><li>Fast data retrival using keys.</li><li>Easy to update and modify data.</li><li>Stores related information together.</li></ul><h4><strong>Creating Dictionary:</strong></h4><p>A dictionary can be created in several ways:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yc4ZoGXgiPE-R8x88aisxQ.png" /><figcaption>Figure 2 : Ways of Creating Python Dictionaty</figcaption></figure><ul><li>Creating empty dictionary d1={}</li><li>Creating empty dictionary using dictionary constructor d2=dict()</li><li>Creating dictionary with Keys and values d3={‘a’:1,’b’:2}</li><li>Creating dictionary using constructor with keys and values d4=dict(a=1,b=2)</li></ul><h4><strong>Syntax</strong></h4><pre>dic={&quot;name&quot;:&quot;Akhil&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Python Course&quot;}<br>print(dic)</pre><p>Output:</p><pre>{&#39;name&#39;: &#39;Akhil&#39;, &#39;age&#39;: 23, &#39;course&#39;: &#39;Python Course&#39;}</pre><h4><strong>Accessing dictionary elements:</strong></h4><p>In dictionary we can access the elements in two ways, using with key and get()</p><h4><strong>Using key:</strong></h4><p>Values are manually accessing with key which is present in dictionary, if key not present it throws an error.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>print(student[&quot;name&quot;])<br>print(student[&quot;course&quot;])</pre><p>Output:</p><pre>Anand<br>Data Science</pre><h4><strong>By using get() method:</strong></h4><p>Values are accessing with In-bulit get() Method and If the key not present in dictionary it doesn’t throw an error.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.get(&quot;age&quot;)</pre><p>Output:</p><pre>23</pre><h4><strong>Modifying Elements:</strong></h4><p>Dictionaries are mutable, we can modify elements using keys.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student[&quot;age&quot;]=25<br>print(student)</pre><p>Output:</p><pre>{&#39;name&#39;: &#39;Anand&#39;, &#39;age&#39;: 25, &#39;course&#39;: &#39;Data Science&#39;}</pre><h4><strong>Dictionary Methods:</strong></h4><p>get():</p><p>The get() method is used to retrieve the value of a specified key from dictionary. if key does not exist, it returns a drfault value (or None) instead of causing error.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.get(&quot;name&quot;)</pre><p>Output:</p><pre>&#39;Anand&#39;</pre><p>keys():</p><p>Returns all keys in the dictionary.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.keys()</pre><p>Output:</p><pre>dict_keys([&#39;name&#39;, &#39;age&#39;, &#39;course&#39;])</pre><p>values():</p><p>Returns all values in the dictionary.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.values()</pre><pre>dict_values([&#39;Anand&#39;, 23, &#39;Data Science&#39;])</pre><p>items():</p><p>Returns all key-value pairs in the dictionary.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.items()</pre><p>Output:</p><pre>dict_items([(&#39;name&#39;, &#39;Anand&#39;), (&#39;age&#39;, 23), (&#39;course&#39;, &#39;Data Science&#39;)])</pre><p>pop():</p><p>Removes a Specific Key-Value pair which is mentioned in method.</p><pre>student={&quot;name&quot;:&quot;Anand&quot;,&quot;age&quot;:23,&quot;course&quot;:&quot;Data Science&quot;}<br>student.pop(&quot;age&quot;)<br>print(student)</pre><p>Output:</p><pre>{&#39;name&#39;: &#39;Anand&#39;, &#39;course&#39;: &#39;Data Science&#39;}</pre><h4><strong>Realtime Applications of Dictionaries:</strong></h4><ul><li>Student management system.</li><li>Employee details.</li><li>Data Science and Machine learning.</li><li>JSON Data handling</li></ul><h4><strong>Conclusion:</strong></h4><p>Python dictionaries are one of the most useful data structures in Python. They store data in key-value pairs, making information easy to organize and access. Their fast lookup and flexible nature make them suitable for handling real-world data efficiently. Dictionaries are widely used in Data Science, Machine Learning, and web applications. Learning dictionaries helps build a strong foundation in Python programming.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5f9f9cb8507" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>