# Python Interview Questions

> GIL, decorators, generators, metaclasses, memory management, and Pythonic patterns.

Canonical: https://www.internhack.in/learn/interview/python-interview
Last updated: 2026-11-28

GIL, decorators, generators, metaclasses, memory management, and Pythonic patterns.

## 50 questions in this section

- [Decorators & Metaprogramming](https://www.internhack.in/learn/interview/python-interview/python-decorators) (Advanced)
- [Generators & Iterators](https://www.internhack.in/learn/interview/python-interview/python-generators) (Advanced)
- [GIL & Concurrency](https://www.internhack.in/learn/interview/python-interview/python-gil) (Advanced)
- [Variables & Data Types](https://www.internhack.in/learn/interview/python-interview/python-variables-types) (Beginner)
- [Strings & String Methods](https://www.internhack.in/learn/interview/python-interview/python-strings) (Beginner)
- [Lists, Tuples & Sets](https://www.internhack.in/learn/interview/python-interview/python-lists-tuples-sets) (Beginner)
- [Dictionaries & Operations](https://www.internhack.in/learn/interview/python-interview/python-dictionaries) (Beginner)
- [Control Flow & Loops](https://www.internhack.in/learn/interview/python-interview/python-control-flow) (Beginner)
- [Functions & Arguments](https://www.internhack.in/learn/interview/python-interview/python-functions) (Beginner)
- [\*args & kwargs](https://www.internhack.in/learn/interview/python-interview/python-args-kwargs) (Intermediate)
- [List Comprehensions](https://www.internhack.in/learn/interview/python-interview/python-list-comprehensions) (Beginner)
- [Lambda, Map, Filter, Reduce](https://www.internhack.in/learn/interview/python-interview/python-lambda-map-filter) (Intermediate)
- [OOP: Classes & Objects](https://www.internhack.in/learn/interview/python-interview/python-oop) (Intermediate)
- [Inheritance & MRO](https://www.internhack.in/learn/interview/python-interview/python-inheritance-mro) (Intermediate)
- [Magic/Dunder Methods](https://www.internhack.in/learn/interview/python-interview/python-dunder-methods) (Intermediate)
- [Abstract Classes & Interfaces](https://www.internhack.in/learn/interview/python-interview/python-abstract-classes) (Intermediate)
- [Exception Handling](https://www.internhack.in/learn/interview/python-interview/python-exceptions) (Beginner)
- [Context Managers (with)](https://www.internhack.in/learn/interview/python-interview/python-context-managers) (Intermediate)
- [File I/O & CSV/JSON](https://www.internhack.in/learn/interview/python-interview/python-file-io) (Beginner)
- [Regular Expressions](https://www.internhack.in/learn/interview/python-interview/python-regex) (Intermediate)
- [Collections Module](https://www.internhack.in/learn/interview/python-interview/python-collections) (Intermediate)
- [Itertools & Functools](https://www.internhack.in/learn/interview/python-interview/python-itertools-functools) (Advanced)
- [Metaclasses](https://www.internhack.in/learn/interview/python-interview/python-metaclasses) (Advanced)
- [Memory Management & GC](https://www.internhack.in/learn/interview/python-interview/python-memory-gc) (Advanced)
- [Virtual Environments & pip](https://www.internhack.in/learn/interview/python-interview/python-venv-pip) (Beginner)
- [Type Hints & mypy](https://www.internhack.in/learn/interview/python-interview/python-type-hints) (Intermediate)
- [Testing (pytest)](https://www.internhack.in/learn/interview/python-interview/python-testing) (Intermediate)
- [Async/Await (asyncio)](https://www.internhack.in/learn/interview/python-interview/python-asyncio) (Advanced)
- [Python Design Patterns](https://www.internhack.in/learn/interview/python-interview/python-design-patterns) (Advanced)
- [Python vs Other Languages](https://www.internhack.in/learn/interview/python-interview/python-vs-others) (Beginner)
- [Dataclasses](https://www.internhack.in/learn/interview/python-interview/python-dataclasses) (Intermediate)
- [\__slots_\_ and Memory Optimization](https://www.internhack.in/learn/interview/python-interview/python-slots) (Advanced)
- [@property and Descriptors](https://www.internhack.in/learn/interview/python-interview/python-property-descriptor) (Intermediate)
- [Walrus Operator and Structural Pattern Matching](https://www.internhack.in/learn/interview/python-interview/python-walrus-operator) (Intermediate)
- [Protocol and Structural Subtyping](https://www.internhack.in/learn/interview/python-interview/python-protocols) (Advanced)
- [concurrent.futures and Multiprocessing](https://www.internhack.in/learn/interview/python-interview/python-concurrent-futures) (Intermediate)
- [Closures, LEGB Rule, and nonlocal](https://www.internhack.in/learn/interview/python-interview/python-closures-scope) (Intermediate)
- [classmethod vs staticmethod](https://www.internhack.in/learn/interview/python-interview/python-classmethod-staticmethod) (Intermediate)
- [Enum in Python](https://www.internhack.in/learn/interview/python-interview/python-enum) (Intermediate)
- [pathlib and File System Operations](https://www.internhack.in/learn/interview/python-interview/python-pathlib) (Beginner)
- [Python Logging Module](https://www.internhack.in/learn/interview/python-interview/python-logging) (Intermediate)
- [namedtuple vs NamedTuple vs dataclass](https://www.internhack.in/learn/interview/python-interview/python-namedtuple) (Intermediate)
- [Descriptors Protocol in Depth](https://www.internhack.in/learn/interview/python-interview/python-descriptors) (Advanced)
- [Python Packaging and Project Setup](https://www.internhack.in/learn/interview/python-interview/python-packaging) (Intermediate)
- [Python Performance Profiling](https://www.internhack.in/learn/interview/python-interview/python-profiling) (Intermediate)
- [TypeVar and Generic Programming](https://www.internhack.in/learn/interview/python-interview/python-typevar-generics) (Advanced)
- [String Formatting Methods](https://www.internhack.in/learn/interview/python-interview/python-string-formatting) (Beginner)
- [subprocess Module](https://www.internhack.in/learn/interview/python-interview/python-subprocess) (Intermediate)
- [Python Data Model and \__dunder_\_ Methods](https://www.internhack.in/learn/interview/python-interview/python-datamodel) (Advanced)
- [Advanced Class Mechanics](https://www.internhack.in/learn/interview/python-interview/python-class-advanced) (Advanced)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
