0) Mental model (what you reach for)


1) Core syntax you should be fluent in

Variables, loops, conditionals

x = 0
if x > 0:
    pass
elif x == 0:
    pass
else:
    pass

for i in range(n):            # 0..n-1
    pass
for i in range(a, b, step):   # a..b-1
    pass

while condition:
    pass

Functions (including helpers)

def f(a: int, b: int) -> int:
    return a + b

def g(nums):
    def helper(i):
        return i + 1
    return helper(0)

Useful Python idioms

# swap
a, b = b, a

# reverse
nums.reverse()
s = s[::-1]

# min/max with key
m = min(items, key=lambda x: x[1])

# enumerate
for i, v in enumerate(nums):
    pass

# zip
for a, b in zip(A, B):
    pass

2) Built-in data structures + common operations