<?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 James Smith on Medium]]></title>
        <description><![CDATA[Stories by James Smith on Medium]]></description>
        <link>https://medium.com/@JamesSmith_Official?source=rss-97e8f793e5c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xXzJOtN6oKcoXBvJ2VLGag.jpeg</url>
            <title>Stories by James Smith on Medium</title>
            <link>https://medium.com/@JamesSmith_Official?source=rss-97e8f793e5c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:54:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@JamesSmith_Official/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 it like a master!! (2022)]]></title>
            <link>https://medium.com/@JamesSmith_Official/python-it-like-a-master-9906fbae0027?source=rss-97e8f793e5c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9906fbae0027</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[James Smith]]></dc:creator>
            <pubDate>Wed, 10 Aug 2022 16:25:38 GMT</pubDate>
            <atom:updated>2022-08-10T16:45:02.321Z</atom:updated>
            <content:encoded><![CDATA[<h3>The 8 best and most groundbreaking blows to give to your software</h3><blockquote>[Insert a boring paragraph about a programming language we all know]</blockquote><p>Without further ado, the cool, unbeatable, and awesome 8 half-price python tricks (half of zero is nothing):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3WE_76UIxyVzXGuo9n1GiQ.jpeg" /></figure><p><strong>1. In-Place Swapping Of Two Numbers:</strong></p><p>a, b <strong>=</strong> 1, 2</p><p>print(x, y)</p><p>x, y <strong>=</strong> y, x</p><p>print(x, y)</p><p><strong>Output:</strong></p><pre>1 2<br>2 1</pre><p><strong>2. Reversing a string:</strong></p><p>a <strong>=</strong> &#39;Python&#39;</p><p>print(a[::<strong>-</strong>1])</p><p><strong>Output:</strong></p><pre>nohtyP</pre><p><strong>3. Create a single string from all the elements in list:</strong></p><p>a <strong>=</strong> [&#39;Python&#39;, &#39;it&#39;, &#39;like&#39;, &#39;a&#39;, &#39;master&#39;]</p><p>print(&quot; &quot;.join(a))</p><p><strong>Output:</strong></p><pre>Python it like a master</pre><p><strong>4. Chaining Of Comparison Operators:</strong></p><p>n <strong>=</strong> 12</p><p>result <strong>=</strong> 1 &lt; n &lt; 20</p><p>print(result)</p><p>result <strong>=</strong> 1 &gt; n &lt;<strong>=</strong> 9</p><p>print(result)</p><p><strong>Output:</strong></p><pre>True<br>False</pre><p><strong>4. Print The File Path Of Imported Modules:</strong></p><p><strong>import</strong> os</p><p><strong>import</strong> socket</p><p>print(os)</p><p>print(socket)</p><p><strong>Output:</strong></p><pre>&lt;module &#39;os&#39; from &#39;/usr/lib/python3.5/os.py&#39;&gt;<br>&lt;module &#39;socket&#39; from &#39;/usr/lib/python3.5/socket.py&#39;&gt;</pre><p><strong>5. Return Multiple Values From Functions:</strong></p><p><strong>def</strong> x():</p><p><strong>return</strong> 1, 2, 3, 4</p><p>a, b, c, d <strong>=</strong> x()</p><p>print(a, b, c, d)</p><p><strong>Output:</strong></p><pre>1 2 3 4</pre><p><strong>6. Find The Most Frequent Value In A List:</strong></p><p>test <strong>=</strong> [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4]</p><p>print(max(set(test), key <strong>=</strong> test.count))</p><p><strong>Output:</strong></p><pre>4</pre><p><strong>7. Check The Memory Usage Of An Object:</strong></p><p><strong>import</strong> sys</p><p>x <strong>=</strong> 1</p><p>print(sys.getsizeof(x))</p><p><strong>Output:</strong></p><pre>28</pre><p><strong>8. Print string N times:</strong></p><p>n <strong>=</strong> 2</p><p>a <strong>=</strong> &#39;Python&#39;</p><p>print(a <strong>*</strong> n)</p><p><strong>Output:</strong></p><pre>PythonPython</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9906fbae0027" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>