Module 1 ยท Lesson 1

What is Python and Why Learn It

๐Ÿ Python โฑ 8 min read ๐Ÿ“– Intro

What is Python?

Python is a high-level, interpreted programming language created by Guido van Rossum and first released in 1991. The name comes from the British comedy group Monty Python โ€” not the snake (though snakes make a great mascot).

Python's design philosophy emphasizes code readability and simplicity. Its syntax lets you express concepts in fewer lines than languages like C++ or Java. Here's the classic "Hello, World!" to illustrate:

print("Hello, World!")

That's it. One line. In Java, the same program requires a class declaration, a main method, and boilerplate imports. Python gets out of your way and lets you focus on solving problems.

Why Python Dominates Today

Python is the most popular programming language in the world (TIOBE Index, IEEE Spectrum, Stack Overflow surveys โ€” it tops them all). Why?

What Can You Build?

๐ŸŒ Web Apps

Django and Flask power Instagram, Pinterest, and millions of other websites.

๐Ÿค– AI & Data Science

pandas, NumPy, scikit-learn, PyTorch โ€” the entire ML stack is Python.

โš™๏ธ Automation

Automate repetitive tasks, scrape data, schedule jobs, manipulate files.

๐Ÿ”ฌ Science & Finance

Physics research, bioinformatics, financial modeling, quantitative trading.

Python 3 vs Python 2

Python 2 reached end-of-life in January 2020. If you see tutorials using print "hello" (without parentheses), they're outdated. This course teaches Python 3 exclusively โ€” everything from Python 3.8 onward, covering modern features like walrus operator, match statements, and type hints.

Pro Tip

Always check which Python version a tutorial targets. Python 2 code will not run in Python 3. The indicator is usually at the top: #!/usr/bin/env python3

How Python Runs Your Code

Python is an interpreted language. There's no separate compilation step โ€” you write code, run it, and see results immediately. Under the hood, Python converts your source code to bytecode (.pyc files) and executes it in the Python Virtual Machine (CPython is the reference implementation).

This contrasts with compiled languages like C, where you compile first, then run the binary. Interpretation is slower at runtime but faster to develop โ€” which is why Python excels for rapid prototyping and scripting.

Key Takeaways

Practice Exercises

  1. Research two major companies or projects that use Python. What do they use it for?
  2. Look up the current Python version at python.org. What's the latest stable release?
  3. Find one Python package on PyPI (pypi.org) that solves a problem you've had. What does it do?