<?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 Echefu Vivian on Medium]]></title>
        <description><![CDATA[Stories by Echefu Vivian on Medium]]></description>
        <link>https://medium.com/@viennivre?source=rss-2040058d0903------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HF-3mM8cYv219yw5MEKVTQ.jpeg</url>
            <title>Stories by Echefu Vivian on Medium</title>
            <link>https://medium.com/@viennivre?source=rss-2040058d0903------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:47:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@viennivre/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[The difference between a list, set and dictionaries]]></title>
            <link>https://viennivre.medium.com/the-difference-between-a-list-set-and-dictionaries-29ce5cccd8b9?source=rss-2040058d0903------2</link>
            <guid isPermaLink="false">https://medium.com/p/29ce5cccd8b9</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Echefu Vivian]]></dc:creator>
            <pubDate>Tue, 09 Nov 2021 07:09:01 GMT</pubDate>
            <atom:updated>2021-11-09T07:09:01.831Z</atom:updated>
            <content:encoded><![CDATA[<p>Lists, dictionaries, and sets are all examples of collection data methods in Python. These data types are all different from each other. In this article I would be explaining each of them and pointing out the key difference.</p><h3>Lists</h3><p>A list is a collection where you can put your values using square brackets, which is <strong>ordered</strong> and <strong>changeable</strong>. You can put several data-types in a list, such as integers, strings, and booleans. An example of a list would look like this:</p><p>listofphones=[“iPhone”, “Nokia”, “Samsung”, “techno”]</p><p>To access a value within a list, you have to use index numbers. For example, if we want to access the second value in the list, we need to use the index number 1. The computer starts counting from zero.</p><h3>Sets</h3><p>A set is a collection data type that is <strong>unordered</strong> and <strong>unindexed</strong> and uses curly braces. This means you do not know in what order the data is and thus you cannot access it using an index number. You can’t have duplicate items in a set. A set looks like this:</p><p>set_of_subjects={“Maths”, “Chemistry”, “Biology”, “English”}</p><h3>Dictionaries</h3><p>A dictionary is a collection data type that is <strong>unordered</strong> and <strong>indexed</strong> and can be changed and uses curly braces. It uses keys and values for the structure of the data. The key is the input of the data and the value is the actual data you are using. A dictionary looks like this:</p><p>customersize={</p><p>“shoulder”:16,</p><p>“bust”: 38,</p><p>“waist”:28</p><p>}</p><p>Just like sets, duplicates are not allowed in dictionaries.</p><h3><strong>Conclusion</strong></h3><p>A list is a collection of ordered data. A set is an unordered collection. A dictionary is an unordered collection of data that stores data in key-value pairs. These are the main differences between these collection data types in Python. I hope you have a better understanding of these data types after reading this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29ce5cccd8b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>