Introduction to Python

Introduction to Python

Python is a high-level, interpreted language known for readable syntax and a huge ecosystem. It is used in web backends, data science, automation, and scripting.

Why Python

  • Readable: Clean syntax, fewer brackets. Great for beginners.
  • Interpreted: No separate compile step; run with python script.py.
  • Ecosystem: PyPI (pip), Django, Flask, pandas, NumPy, and more.
  • Interviews: Often used in coding interviews and take-home tasks.

Your first program

Create a file hello.py:

python
print(\"Hello, world!\")

Run it: python hello.py. No class or main required; the script runs top to bottom.

Python versions

Use Python 3 (e.g. 3.10+). Python 2 is end-of-life. Check with python --version or python3 --version.

What comes next

We will cover variables and types, conditionals and loops, functions, lists and dicts, classes, modules, and file I/O.