Logo

Question preview

Mangled up.

What this preview is

About this preview

Mangled up. is a easy quant interview question on language knowledge in Python.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

What this Python code-reading question tests

This is a medium-difficulty question that requires careful attention to Python's object model and how language features interact. Rather than asking you to write code, it presents a snippet and asks you to predict its output—a skill that matters in both interviews and code review.

Questions like this probe whether you understand the subtle behaviour of Python's core mechanisms: how names bind to objects, how scope works, and how built-in functions and methods behave in edge cases. Interviewers use them to see if you can read unfamiliar code quickly and reason about what it does without running it.

  • Name binding and object references
  • Scope resolution (LEGB rule)
  • Mutation vs. immutability
  • Built-in type behaviour and method side effects