<?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"><channel><title><![CDATA[Shokr on Engineering]]></title><description><![CDATA[Lessons from running distributed systems in production]]></description><link>https://blog.shokr.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 01 Nov 2026 15:50:18 GMT</lastBuildDate><atom:link href="https://blog.shokr.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Python Data Types]]></title><description><![CDATA[In programming, data type is an important concept. Variables can store data of different types, and different types can do different things. Every value in…]]></description><link>https://blog.shokr.dev/python-data-types</link><guid isPermaLink="true">https://blog.shokr.dev/python-data-types</guid><dc:creator><![CDATA[Muhammed Shokr]]></dc:creator><pubDate>Fri, 19 Jun 2020 23:00:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1615893834783/eUyPRNPe3.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In programming, data type is an important concept.</p>
<p>Variables can store data of different types, and different types can do different things.</p>
<p>Every value in Python has a datatype. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes.</p>
<h2 id="python-contains-12-built-in-data-types">Python Contains 12 built-in data types</h2>
<ul>
<li>4 Numeric Type [ int , float , complex , bool ] </li>
<li>4 Sequence Type [ str , list , tuple , range ]</li>
<li>2 Set Type [ set, frozenset ]</li>
<li>1 Mapping Type [ dict ]</li>
<li>1 Binary Type: [ bytes ]</li>
</ul>
<h2 id="mutable-vs-immutable">Mutable VS Immutable</h2>
<table>
<thead>
<tr>
<td></td><td></td></tr>
</thead>
<tbody>
<tr>
<td>Mutable</td><td>Values Changed</td></tr>
<tr>
<td>Immutable</td><td>Values Cannot Be Changed</td></tr>
</tbody>
</table>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615893831167/V1-44vh0m.png" alt="Mutable VS Immutable" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615893833000/Njceb0gCJ.png" alt="Data Types: Mutable VS Immutable" /></p>
<h2 id="data-type-in-action">Data Type In Action</h2>
<table>
<tbody>
<tr>
<th>Example</th>
<th>Data Type</th>
</tr>
<tr>
<td>x = "Hello World"</td>
<td>str</td>
</tr>
<tr>
<td>x = ["apple", "banana", "cherry"]</td>
<td>list</td>
</tr>
<tr>
<td>x = ("apple", "banana", "cherry")</td>
<td>tuple</td>
</tr>
<tr>
<td>x = range(6)</td>
<td>range</td>
</tr>
<tr>
<td>x = 20</td>
<td>int</td>
</tr>
<tr>
<td>x = 20.5</td>
<td>float</td>
</tr>
<tr>
<td>x = 1j</td>
<td>complex</td>
</tr>
<tr>
<td>x = True</td>
<td>bool</td>
</tr>
<tr>
<td>x = {"apple", "banana", "cherry"}</td>
<td>set</td>
</tr>
<tr>
<td>x = frozenset({"apple", "banana", "cherry"})</td>
<td>frozenset</td>
</tr>
<tr>
<td>x = {"name" : "John", "age" : 36}</td>
<td>dict</td>
</tr>
<tr>
<td>x = b"Hello"</td>
<td>bytes</td>
</tr>
</tbody>
</table>

<p>Thus, Try with these snippets.</p>
]]></content:encoded></item></channel></rss>