Python Introduction
Python was created 1991 with focus on code readability and express concepts in fewer lines of code.
- Simple and readable syntax makes it beginner-friendly.
- Runs seamlessly on Windows, macOS and Linux.
- Includes libraries for tasks like web development, data analysis and machine learning.
- Variable types are determined automatically at runtime, simplifying code writing.
- Supports multiple programming paradigms, including object-oriented, functional and procedural programming.
- Free to use, distribute and modify.
Understanding Hello World Program in Python
Hello, World! in python is the first python program which we learn when we start learning any program. It’s a simple program that displays the message “Hello, World!” on the screen.

Here’s the “Hello World” program:
# This is a comment. It will not be executed.
print("Hello, World!")
Output
Hello, World!
How does this work:
- print() is a built-in Python function that tells the computer to show something on the screen.
- The message "Hello, World!" is a string, which means it's just text. In Python, strings are always written inside quotes (either single ' or double ").
- Anything after # in a line is a comment. Python ignores comments when running the code, but they help people understand what the code is doing.
- Comments are helpful for explaining code, making notes or skipping lines while testing.
We can also write multi-line comments using triple quotes:
"""
This is a multi-line comment.
It can be used to describe larger sections of code.
"""
To understand comments in detail, refer to article: Comments.
Indentation in Python
In Python, Indentation is used to define blocks of code. It tells the Python interpreter that a group of statements belongs to a specific block. All statements with the same level of indentation are considered part of the same block. Indentation is achieved using whitespace (spaces or tabs) at the beginning of each line. The most common convention is to use 4 spaces or a tab, per level of indentation.
Example:
print("I have no indentation")
print("I have tab indentaion")
Output:
Hangup (SIGHUP)
File "/home/guest/sandbox/Solution.py", line 3
print("I have tab indentaion")
IndentationError: unexpected indent
Explanation:
- first print statement has no indentation, so it is correctly executed.
- second print statement has tab indentation, but it doesn't belong to a new block of code. Python expects the indentation level to be consistent within the same block. This inconsistency causes an IndentationError.
To understand Indentation in detail, refer to article: Indentation
Famous Application Built using Python
- YouTube: World’s largest video-sharing platform uses Python for features like video streaming and backend services.
- Instagram: This popular social media app relies on Python’s simplicity for scaling and handling millions of users.
- Spotify: Python is used for backend services and machine learning to personalize music recommendations.
- Dropbox: The file hosting service uses Python for both its desktop client and server-side operations.
- Netflix: Python powers key components of Netflix’s recommendation engine and content delivery systems (CDN).
- Google: Python is one of the key languages used in Google for web crawling, testing and data analysis.
- Uber: Python helps Uber handle dynamic pricing and route optimization using machine learning.
- Pinterest: Python is used to process and store huge amounts of image data efficiently.
What can we do with Python?
Python is used for:
- Web Development: Frameworks like Django, Flask.
- Data Science and Analysis: Libraries like Pandas, NumPy, Matplotlib.
- Machine Learning and AI: TensorFlow, PyTorch, Scikit-learn.
- Automation and Scripting: Automate repetitive tasks.
- Game Development: Libraries like Pygame.
- Web Scraping: Tools like BeautifulSoup, Scrapy.
- Desktop Applications: GUI frameworks like Tkinter, PyQt.
- Scientific Computing: SciPy, SymPy.
- Internet of Things (IoT): MicroPython, Raspberry Pi.
- DevOps and Cloud: Automation scripts and APIs.
- Cybersecurity: Penetration testing and ethical hacking tools.

Python Introduction

How Python Programs are Executed

Python Programming Terminology

Python Installation and First Program

Comments in Python
