1000 Python Interview Questions and Answers
1. What is Python?
Python is an interpreted, high-level, and general-purpose programming language known for its
simplicity and readability.
2. What are Python's key features?
Python is dynamically typed, has automatic memory management, extensive libraries, and supports
object-oriented and functional programming.
3. What is the difference between `is` and `==`?
`is` checks identity (same memory location), whereas `==` checks equality of values.
4. Explain mutable and immutable data types.
Mutable: list, dict, set. Immutable: int, str, tuple.
5. What is the difference between a list and a tuple?
Lists are mutable, tuples are immutable. Lists have more overhead but offer flexibility.
6. What is the Global Interpreter Lock (GIL)?
The GIL allows only one thread to execute Python bytecode at a time, limiting true parallelism in
multi-threaded programs.