← BYTES
Python·Starter·Ref: 6.1.14

What does `print(f"{1+1}")` output?

Have a question about this video? Mention reference 6.1.14 when you contact us.

a."1+1"
b.An error
c."{1+1}"
d.2
An f-string evaluates any expression inside `{}` and inserts its result as text -- `1+1` evaluates to 2, so this prints 2.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES6114#Python