Forever single
What this preview is
Forever single is a hard quant interview question on language knowledge in Python.
- Difficulty
- Hard
- Topic
- Language Knowledge
- Discipline
- Quant development
- Language
- Python
- Companies
- 0
What this Python type-checking question tests
This is a Cracked-level question that probes your understanding of how modern Python typecheckers like mypy infer and represent types. It asks you to think like the tool itself—to predict what a static type-checker would conclude about a variable's type based on code inspection alone, without running it.
The question rewards familiarity with type inference rules, union types, and how typecheckers handle assignments and reassignments. You need to understand the difference between runtime behaviour and what the type system can statically prove. This matters because production codebases increasingly rely on type annotations and tooling to catch errors before deployment.
- Type inference and flow-sensitive typing
- Union types and type narrowing
- How assignment patterns affect inferred types
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.