Tag view

#control-flow

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with control-flow

2 cards

Python Medium Theory

Conditional statements, ternary expressions, and match-case basics

Python uses `if`/`elif`/`else` for general branching, a ternary expression for concise value selection, and `match-case` for structural pattern matching in newer versions.

  • Use ternary for small expressions only
  • match-case compares shapes and patterns
  • Readable branching beats clever branching

Conditional statements, ternary expressions, and match-case basics