Python · The language, not just syntax
What is Python and what are its defining characteristics?
Short answer
Python is a high-level, dynamically typed, garbage-collected language. CPython compiles source to bytecode and runs it on a virtual machine, trading raw speed for fast development and a broad ecosystem.
CPython, the reference implementation, parses source into an abstract syntax tree, compiles it to bytecode, and executes that bytecode in a stack-based virtual machine. Modules are compiled once and cached in __pycache__ directories.
def total(prices):
return sum(price for price in prices if price > 0)
print(total([10, -5, 2.5])) # 12.5What Python optimises for
- Readability: significant indentation and a small set of obvious constructs
- Development speed: dynamic typing and a large standard library
- Portability: the same code runs on Linux, macOS and Windows
- Interoperability: C extensions and FFI make it a glue language for native code
The trade-off is runtime performance and memory overhead. CPython does not perform aggressive ahead-of-time optimisation, and the GIL constrains CPU-bound threading. For CPU-heavy work teams move hot paths to NumPy, C extensions, Rust, or separate processes.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1What happens between writing a .py file and executing it?
- 2Where would you not choose Python for a production service?
- 3How do the language and CPython differ?
- 4What does dynamically typed actually mean at runtime?
Say it in the interview
Python is a high-level, dynamically typed language with automatic memory management. CPython compiles source to bytecode and runs it on a virtual machine, and it caches compiled modules. I choose it for readable code, fast iteration and a strong ecosystem, while accepting slower raw execution and the GIL for CPU-bound threads. When a hot path matters I move it to a native library or another process.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Python mock interview and get scored feedback on depth, clarity and confidence.