Daily #33 · 31 October 2026
Hello to nobody Hard
What does this print?
name = ""
print("Hi " + name if name else "there")
Show the answer
C: there
Why: if ... else inside an expression has the lowest priority, so it wraps everything to its left: ("Hi " + name) if name else "there". The name is empty, so the whole thing is "there". Brackets fix it: "Hi " + (name if name else "there").