<?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 Ammar Khan on Medium]]></title>
        <description><![CDATA[Stories by Ammar Khan on Medium]]></description>
        <link>https://medium.com/@innoxentammar27?source=rss-c1638e06afc8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4DPIKzwNyJY6V9Kc</url>
            <title>Stories by Ammar Khan on Medium</title>
            <link>https://medium.com/@innoxentammar27?source=rss-c1638e06afc8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:22:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@innoxentammar27/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[List at a glance — python list methods]]></title>
            <link>https://medium.com/@innoxentammar27/list-at-a-glance-python-list-methods-d081e8ec574d?source=rss-c1638e06afc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d081e8ec574d</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ammar Khan]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 16:21:55 GMT</pubDate>
            <atom:updated>2026-03-24T16:21:55.062Z</atom:updated>
            <content:encoded><![CDATA[<p>🚀 Mastering Python Lists: Small Tricks That Make a Big Difference<br>If you’re learning Python, chances are you’ve already met one of its most powerful and flexible data structures: lists. At first glance, they seem simple—but with just a few built-in methods, lists can become incredibly efficient tools for real-world programming.<br>Let’s break down a few practical list operations that can instantly level up your coding skills.<br>🔹 1. Adding Elements Like a Pro<br>Appending items to a list is straightforward:<br>Python<br>rafay = [1, &quot;Rafay&quot;, 9.0]<br>rafay.append(&quot;Machine Learning&quot;)<br>👉 Result:<br>Python<br>[1, &#39;Rafay’, 9.0, &#39;Machine Learning’]<br>Why it matters:<br>Appending allows you to dynamically grow your data—perfect for user input, logs, or datasets.<br>🔹 2. Removing Items with Precision<br>Need to remove something? Use pop():<br>Python<br>rafay.pop(2)<br>👉 Output:<br>Python<br>9.0<br>👉 Updated list:<br>Python<br>[1, &#39;Rafay’, &#39;Machine Learning’]<br>Pro Tip:<br>pop() not only removes an item but also returns it—super useful when you need the value later.<br>🔹 3. Sorting Made Simple<br>Sorting lists is where things get interesting:<br>Python<br>my_list = [2, 4, 1, 56, 79]<br>my_list.sort()<br>👉 Result:<br>Python<br>[1, 2, 4, 56, 79]<br>Want descending order?<br>Python<br>my_list.sort(reverse=True)<br>🔹 4. sort() vs sorted() — Know the Difference<br>Python<br>sorted_list = sorted(my_list)<br>sort() → modifies the original list<br>sorted() → creates a new list<br>Why this matters:<br>When working with important data, preserving the original version can save you from major headaches.<br>🔹 5. Reversing Lists Instantly<br>Python<br>my_list.reverse()<br>👉 Flips the list in place—fast and efficient.<br>💡 Final Thoughts<br>Python lists may seem basic, but mastering these small operations can significantly improve your efficiency and code clarity.<br>Remember:<br>Use append() to grow your list<br>Use pop() to remove (and retrieve) items<br>Use sort() or sorted() depending on your needs<br>Use reverse() for quick order flips<br>✨ Your Turn<br>Try combining these methods in your own mini-project:<br>Build a task manager<br>Sort student scores<br>Manage a shopping list<br>Small steps like these turn beginners into confident Python developers.<br>💬 What’s your favorite Python list trick? Share it below and let’s learn together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d081e8ec574d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>