Aller au contenu principal

00.1 - Why Python? History & Ecosystem

Theory 20 min Beginner

What is Python?

Python is a high-level, interpreted, general-purpose programming language that emphasizes code readability and simplicity.

"Python is an experiment in how much freedom programmers need. Too much freedom and nobody can read anyone else's code; too little and expressiveness is endangered." — Guido van Rossum, creator of Python

Python was created by Guido van Rossum and first released in 1991. The name comes from the British comedy group Monty Python's Flying Circus — not the snake.


Python vs. Other Languages

FeaturePythonJavaC++JavaScript
SyntaxMinimal, readableVerboseComplexModerate
TypingDynamicStaticStaticDynamic
SpeedInterpreted (slower)Compiled (fast)Compiled (fastest)Interpreted
Learning curveVery lowModerateHighLow-Moderate
Main useData, scripting, webEnterprise, AndroidSystems, gamesFrontend, Node
Package ecosystemPyPI (500k+ packages)Mavenvcpkgnpm
┌──────────────────────────────────────────────────────────────┐
│ Language Spectrum │
│ │
│ Low-level High-level │
│ ┌────────┬──────────┬────────────┬───────────┬──────────┐ │
│ │ C/C++ │ Rust │ Java │ JavaScript│ Python │ │
│ │ (fast) │ (safe) │(enterprise)│ (web) │(readable)│ │
│ └────────┴──────────┴────────────┴───────────┴──────────┘ │
│ │
│ Hardware control ◄─────────────────► Developer productivity │
└──────────────────────────────────────────────────────────────┘

Python Versions: 2 vs 3

Python 2 reached end-of-life on January 1, 2020. All new code must use Python 3.

Python 2Python 3
StatusDead (EOL 2020)Current (3.11+)
printprint "hello"print("hello")
division5 / 2 = 2 (integer)5 / 2 = 2.5 (float)
UnicodeASCII defaultUnicode default
f-stringsNot availableAvailable (3.6+)

Always use Python 3. This course uses Python 3.10+.


Where is Python Used?


Python's Key Design Principles

Python follows the Zen of Python (PEP 20). The most important rules:

PrincipleMeaning
Beautiful is better than uglyWrite clean, readable code
Explicit is better than implicitBe clear about what you're doing
Simple is better than complexAvoid over-engineering
Readability countsCode is read more than it's written
There should be one obvious wayFollow conventions (PEP 8)

You can see the full Zen by running import this in Python.

import this
# The Zen of Python, by Tim Peters
# Beautiful is better than ugly.
# Explicit is better than implicit.
# Simple is better than complex.
# ...

Python Popularity

Python has been the #1 most popular programming language on the TIOBE Index since 2021. Key reasons:

  1. Low barrier to entry — readable syntax, no boilerplate
  2. Versatility — one language for scripts, web apps, ML, automation
  3. Enormous ecosystem — PyPI has over 500,000 packages
  4. Community — millions of developers, tutorials, Stack Overflow answers
  5. Industry adoption — Google, Netflix, Spotify, NASA, Instagram all use Python

Key Vocabulary

TermDefinition
InterpretedCode is executed line by line at runtime, not pre-compiled
Dynamic typingVariable types are determined at runtime, not declared
PEPPython Enhancement Proposal — the official standard for Python changes
PEP 8The Python style guide: naming conventions, spacing, imports
REPLRead-Eval-Print Loop — interactive Python shell (python3)
CPythonThe official Python implementation, written in C
PyPIPython Package Index — the official repository for Python packages
pipPackage Installer for Python — pip install flask

Summary

  • Python was created in 1991 by Guido van Rossum and is named after Monty Python
  • Python 3 is the only version to use — Python 2 is dead since 2020
  • Python is dynamically typed, interpreted, and emphasizes readability
  • It dominates Data Science, Machine Learning, automation, and web backends
  • The Zen of Python guides idiomatic code: simple, explicit, readable