Skip to content
  • Interview Questions · Python

Interview Questions

LearnViaNotes @learnvianotes· 4 min read

The Python questions that come up again and again — with short, precise answers you can say out loud.

Core language

What is the difference between a list and a tuple?

How is a Python dict implemented, and why are lookups O(1)?

What is the GIL?

is vs ==?

What happens with a mutable default argument?

Shallow copy vs deep copy?

Functions & objects

What are *args and **kwargs?

What is a decorator?

Generator vs list — when would you use each?

Runtime, memory & concurrency

How does Python manage memory?

What are @staticmethod and @classmethod?

Explain the MRO and super().

What does if __name__ == "__main__": do?

How do you handle exceptions properly?

Predict the output

What is the output? (lists vs tuples with +=)

What is the output? (lambdas in a loop)

Quick-fire checklist

Mutable vs immutable · List vs tuple vs set vs dict · Hashing & dict keys · Comprehensions · Generators & yield · Decorators · Closures & LEGB · *args / **kwargs · Shallow vs deep copy · GIL & concurrency · MRO & super() · Dunder methods · Exceptions & with · @dataclass · Big-O of built-ins · Descriptors & property · __new__ vs __init__ · Metaclasses · Iterator protocol · asyncio vs threads · Type hints · functools.cache · Testing & mocking

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report