Vidyalelo
Python · Q3

Formatting and Decorators

Programming · Python · question 3

Q3

Which of the following is an f-string in Python?

A.
f"Hello {name}"
Answer
B.
"Hello {}".format(name)"
C.
"Hello %s" % name
D.
format("Hello {}", name)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board