Python · Structural Pattern Matching
What does this print? ``` def f(x): match x: case []: return "empty" case [a]: return f"one:{a}" case [a, b, *rest]: return f"{a},{b}+{len(rest)}" print(f([10, 20, 30, 40])) ```
Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.
