Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 2.87 KB

File metadata and controls

62 lines (49 loc) · 2.87 KB

Python Interview Topics

Commonly asked Python concepts for software engineer interviews. Each folder includes:

  • example.py — runnable code
  • README.md — descriptive walkthrough + Interview Q&A (5–6 questions with answers)

Core language

Folder Concept Run
decorator Function/class decorators python3 example.py
context_manager with statement python3 example.py
generator Generators & yield python3 example.py
iterator Iterator protocol python3 example.py
closure Closures & nested functions python3 example.py
args_kwargs *args & **kwargs python3 example.py
scope LEGB, global, nonlocal python3 example.py
comprehension List/dict/set comprehensions python3 example.py
lambda_map_filter map, filter, zip python3 example.py
exception_handling try/except/else/finally python3 example.py
mutable_default Mutable default argument trap python3 example.py
identity_equality is vs ==, hashability python3 example.py
copy_deepcopy Shallow vs deep copy python3 example.py

OOP & classes

Folder Concept Run
dunder_methods Magic methods python3 example.py
inheritance_mro Inheritance & MRO python3 example.py
metaclass Metaclasses python3 example.py
property_descriptor Properties & descriptors python3 example.py
dataclass @dataclass python3 example.py
slots __slots__ python3 example.py
abc Abstract base classes python3 example.py

Concurrency & async

Folder Concept Run
threading Threads, locks, GIL python3 example.py
multiprocessing Processes & CPU parallelism python3 example.py
async_await Async I/O python3 example.py

Standard library & tooling

Folder Concept Run
functools_module lru_cache, partial python3 example.py
type_hints Typing & generics python3 example.py
unittest_mock Mocking & patching python3 example.py
memory_management GC, refcount, weakref python3 example.py

How to use

cd python/<topic>
python3 example.py

Read the README in each folder for a descriptive example walkthrough and full Interview Q&A.