Python Tutorial 0/52 lessons ~6 min read Lesson 2

    What is Python?

    Python is a high-level, interpreted, dynamically typed language created by Guido van Rossum in 1991.

    Course progress0%
    Focus
    8 guided sections
    Practice signal
    Examples included
    Career prep
    Interview Q&A included

    Introduction

    Python is a high-level, interpreted, dynamically typed language created by Guido van Rossum in 1991. Its design philosophy is captured in The Zen of Python: simple is better than complex, readability counts.

    Understanding the topic

    Core concepts to understand:

    • Interpreted — no compile step; runs via CPython VM.
    • Dynamically typed — types checked at runtime.
    • Multi-paradigm — procedural, OOP, functional.
    • import this reveals The Zen of Python.

    Syntax reference

    Visual flow / code:

    python
    # The Zen of Python (excerpt)
    # Beautiful is better than ugly.
    # Explicit is better than implicit.
    # Simple is better than complex.
    # Readability counts.
    import this

    Execution workflow

    1What is Python? Workflow
    1 / 4

    Interpreted

    no compile step; runs via CPython VM.

    Real-world use

    Python's readability makes it ideal for teams: junior devs can ramp up fast, and senior engineers can express complex logic concisely.

    Best practices

    • Write code as if explaining it to a colleague.
    • Follow PEP 8 style guide.
    • Use meaningful names.

    Advanced interview questions

    Interview Prep

    Practice concise answers, then expand each card for the explanation.

    3 questions
    1BeginnerQuestionWhat does 'interpreted' mean?+

    Answer

    It means the program is executed by another program, the interpreter, instead of being turned into a standalone machine-code executable ahead of time. CPython reads your source, compiles it to bytecode, and a virtual machine runs that bytecode. In practice this gives a fast edit-run cycle and the REPL, at the cost of raw speed compared to ahead-of-time compiled languages.

    Follow-up

    Does 'interpreted' say anything about the language itself, or only about an implementation?
    2BeginnerQuestionIs Python compiled?+

    Answer

    Partly. CPython compiles source to bytecode (cached in __pycache__ as .pyc files) and then interprets that bytecode on a virtual machine, so it is compiled to an intermediate form but not to native machine code by default. Other implementations differ: PyPy uses a JIT, and CPython 3.13 has an experimental JIT that is off by default.

    Follow-up

    What is stored in a .pyc file and when is it regenerated?
    3BeginnerQuestionWhat is The Zen of Python?+

    Answer

    It is a set of 19 guiding aphorisms about Python's design, written by Tim Peters and available by running import this. Lines like 'Readability counts' and 'Explicit is better than implicit' are used to justify style and API decisions. It is a philosophy rather than a rulebook, and some aphorisms pull in opposite directions.

    Follow-up

    Which aphorism do you think applies most when reviewing code?

    Summary

    In summary: Python = high-level, interpreted, dynamic. Readability is a core value.

    Ready to mark this lesson complete?Track your journey across the entire course.