practicepython.in
python exercises
171 exercises

Daily #16 · 14 October 2026

An f-string with an equals sign Easy

What does this print?

width = 3
print(f"{width * 2 = }")
  1. Awidth * 2 = 6
  2. B{width * 2 = }
  3. Craises SyntaxError
  4. D6
Show the answer

A: width * 2 = 6

Why: A trailing = inside an f-string prints the expression, then its value, spaces included. It is the quickest debug print there is.

Play today’s puzzle →