<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Samiksha Srivastav</title>
    <description>The latest articles on Forem by Samiksha Srivastav (@samikshasri).</description>
    <link>https://forem.com/samikshasri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3912250%2Fbd929b4b-28fa-47fa-8a4c-a1093a1484fc.png</url>
      <title>Forem: Samiksha Srivastav</title>
      <link>https://forem.com/samikshasri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/samikshasri"/>
    <language>en</language>
    <item>
      <title>Day-2 of learning Python | Exploring Python Shell and Module Reloading</title>
      <dc:creator>Samiksha Srivastav</dc:creator>
      <pubDate>Tue, 05 May 2026 14:28:45 +0000</pubDate>
      <link>https://forem.com/samikshasri/day-2-of-learning-python-exploring-python-shell-and-module-reloading-2275</link>
      <guid>https://forem.com/samikshasri/day-2-of-learning-python-exploring-python-shell-and-module-reloading-2275</guid>
      <description>&lt;p&gt;While learning python today, I spent some time understanding how the Python shell works and how modules behave inside it.&lt;/p&gt;

&lt;p&gt;The Python shell (or REPL) is basically an interactive environment where you can run code line-by-line. It's super useful when you just want to test something quickly instead of running a full script every time.&lt;/p&gt;

&lt;p&gt;While experimenting, I tried something interesting. I created a Python file, defined a few functions and variables in it, and then imported that file into the Python shell. everything worked perfectly at first.&lt;/p&gt;

&lt;p&gt;But then I made some changes in the file - added few functions and modified a few existing ones - and tried to use them again in the shell. Surprisingly, I started getting errors.&lt;/p&gt;

&lt;p&gt;At first, it felt confusing because I had clearly updated the code. But then I learned what was actually happening behind the scenes.&lt;/p&gt;

&lt;p&gt;When we import a module in Python, it gets loaded into the memory once. So even if we change the file later and save them, the Python shell doesn't automatically pick up those changes.&lt;/p&gt;

&lt;p&gt;To fix this, Python provides a way to reload the module using the &lt;strong&gt;importlib&lt;/strong&gt; module:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;import importlib&lt;br&gt;
importlib.reload(module_name)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This forces Python to reload the module and reflect the latest changes.&lt;/p&gt;

&lt;p&gt;It was a small thing, but understanding this made the behavior of Python much clearer to me. It also showed me how important it is to know what's happening internally, not just write code.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>learning</category>
      <category>python</category>
    </item>
    <item>
      <title>Getting Started with Python</title>
      <dc:creator>Samiksha Srivastav</dc:creator>
      <pubDate>Mon, 04 May 2026 14:45:53 +0000</pubDate>
      <link>https://forem.com/samikshasri/getting-started-with-python-3cnj</link>
      <guid>https://forem.com/samikshasri/getting-started-with-python-3cnj</guid>
      <description>&lt;p&gt;Today I started learning Python, and I explored some fundamental concepts that helped me understand how Python actually works behind the scenes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Python?
&lt;/h2&gt;

&lt;p&gt;Python is a &lt;strong&gt;high-level, interpreted programming language.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Being &lt;strong&gt;high-level&lt;/strong&gt; means it is easy to read and write, as it is closer to human language and abstracts away hardware complexity.&lt;/li&gt;
&lt;li&gt;This makes it very different from low-level languages like &lt;strong&gt;assembly&lt;/strong&gt; or &lt;strong&gt;machine language&lt;/strong&gt;, which directly interact with hardware.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Is Python Really Interpreted?
&lt;/h2&gt;

&lt;p&gt;We often hear that Python is an interpreted language, but there is a bit more to it.&lt;/p&gt;

&lt;p&gt;Python actually works in two main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compilation to Bytecode&lt;/strong&gt;&lt;br&gt;
 First, Python converts your code into an intermediate format called &lt;strong&gt;bytecode.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Execution using Python Virtual Machine (PVM)&lt;/strong&gt;&lt;br&gt;
 This bytecode is then executed by the &lt;strong&gt;Python Virtual Machine (PVM.)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This process is what makes Python both flexible and easy to debug.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is &lt;strong&gt;pycache&lt;/strong&gt;?
&lt;/h2&gt;

&lt;p&gt;While running Python programs, you might notice a folder named &lt;strong&gt;pycache&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It stores compiled &lt;strong&gt;bytecode files(.pyc)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;These files help Python run faster when the program is executed again &lt;/li&gt;
&lt;li&gt;This process is usually automatic and hidden from developers
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python is &lt;strong&gt;easy to read and beginner-friendly&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;interpreted but internally uses bytecode&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Execution happens through the Python Virtual Machine (PVM)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pycache&lt;/strong&gt; improves performance by storing compiled code&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Understanding what happens behind the scenes makes learning Python much more interesting. This is just the beginning of my journey, and I'm excited to explore more.&lt;/p&gt;

&lt;p&gt;Follow my journey as I continue learning and building in Python!&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>learninpublic</category>
    </item>
  </channel>
</rss>
