Can you survive the Python Interview Iceberg? In this video, I break down real Quant Developer interview questions, ranking them from basic data structures to obscure internal mechanics.
---
00:00 Intro
00:21 sep vs end in print()
print("A", "B", sep="-", end=" ")
Output: A-B
01:01 Print latency
02:17 == versus id()
a = [1, 2, 3]
b = [1, 2, 3]
print(a == b) # True (values match)
print(a is b) # False (different memory addresses)
03:13 What is an Iterable?
04:02 How does an Iterable end?
04:45 Speed up Python loops
squares = [x**2 for x in range(10)]
05:51 List complexities
07:06 Variadic arguments
def func(*args, **kwargs):
for arg in args:
print(arg)
07:54 Level 2: Classes, Modules, Dictionaries
07:59 Class vs Instance attributes
class Dog:
species = "Canis" # Class attribute
def init(self, name):
self.name = name # Instance attribute
08:36 slots
class Ca:
_slots_ = 'foo', 'bar'
09:14 How Garbage Collection works
10:48 Definition of a Module
11:09 Import time vs Runtime
12:10 Dictionary implementation
12:53 d.get(k) vs d[k]
val = d.get("key", "default_value")
val = d["key"]
13:08 List Comprehension vs Generator Expression
List Comp
lst = [x*2 for x in range(1000)]
Gen Exp
gen = (x*2 for x in range(1000))
13:35 Can you reset a generator?
13:51 Level 3: Decorators, Context Managers, Metaclasses
14:30 Writing a custom decorator
import functools
def my_decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
print("Before")
result = func(*args, **kwargs)
print("After")
return result
return wrapper
15:33 Writing a custom Context Manager
class FileManager:
def enter(self):
self.f = open("file.txt", "w")
return self.f
def exit(self, exc_type, exc_val, exc_tb):
self.f.close()
15:59 Context Manager guarantees & exceptions
16:33 Metaclasses defined
17:28 Level 4: AsyncIO, Descriptors, ABCs, GIL
18:22 Abstract Base Classes (ABCs)
from abc import ABC, abstractmethod
class Shape(ABC):
@abstractmethod
def area(self):
pass
18:41 The Global Interpreter Lock (GIL)
19:39 Cooperative Concurrency vs Preemptive Scheduling
20:02 Descriptors & @property
class Circle:
def init(self, radius):
self._radius = radius
@property
def radius(self):
return self._radius
20:26 Goose Typing
from collections.abc import Sized
class MyList:
def len(self): return 5
print(isinstance(MyList(), Sized)) # True (Goose Typing)
21:48 Level 5: Bytecode & CPython Internals
22:14 CPython memory management
23:30 Inspecting Bytecode
import dis
def hello(): print("Hello")
dis.dis(hello)
23:51 CPython vs other implementations
24:40 What does "Pythonic" mean?
25:56 Const sets and const dictionaries
Immutable Set
f_set = frozenset([1, 2, 3])
Read-only Dict proxy
from types import MappingProxyType
d = {"a": 1}
read_only = MappingProxyType(d)
27:11 Controlling memory allocation (new)
class Singleton:
_instance = None
def new(cls):
if cls._instance is None:
cls._instance = super().new(cls)
return cls._instance
27:53 Feedback
29:39 Writing a Memoize decorator (@cache)
from functools import lru_cache
@lru_cache(maxsize=None)
def fib(n):
if n == 1:
return n
return fib(n-1) + fib(n-2)
31:38 Is Set order deterministic? (Salting)
32:24 Interview timeline
32:41 Resources for studying Python
---
Reference
/ if-you-cant-explain-these-python-concepts-...
Auf dieser Seite können Sie das Online-Video Do You REALLY know Python? Quant Dev Mock Interview mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Zack Light 26 Dezember 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 5,182 Mal angesehen und es wurde von 212 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!