How Python Works?

Devyani Kaulas
2 min readFeb 1, 2021

Python a high-level programming language. Developers write code in it and make interactive projects. Although, many people who are new to this language or have been using it for coding are often confused about its working. Here I would explain in simple words the functioning of Python.

  1. Source Code: It is a file in which you have written your code. It is <file_name.py> .py is the extension we use for a python code.
main.py

2. This file in this step would be read by an interpreter line by line and each line will execute an instruction. This process could look like the following picture.

Byte Code

Don’t worry! You don’t have to memorize the byte code.

3. Then a virtual machine is used which can be cpython, jython, pypy etc. The popular one is cpython virtual machine

4. Now this virtual machine will make it a machine language code.

010010101011010101

Now we can communicate with our computer. This is the beauty of python that makes it portable. Happy Coding! :)

--

--