Indentation defines scope
Unlike languages that use {}, Python marks a block by its indentation. All lines more indented than the if belong to that branch. Mixing tabs and spaces raises IndentationError, so configure your editor to use 4 spaces.
if x:
if y: # nested block, one more indent
do_thing()
The logical structure is visible purely from indentation.
Short-circuit evaluation
and returns the first falsy operand or the last operand; or returns the first truthy operand or the last. This enables compact patterns:
name = user_name or "guest" # fallback when empty
result = value and process(value)
Because evaluation stops early, side effects in the second operand only run when needed.