Skip to main content
Python Code Completion Easy +10 XP

F-String Format

Complete the f-string.

PythonFill in the blank
name = "Alice"
age = 30
print(___"My name is {name} and I am {age}")

Type the missing code

Show answer and explanation

Answer: f

f-strings in Python are prefixed with 'f' to enable variable interpolation inside curly braces.

Hint: What prefix enables string interpolation in Python?

What this challenge tests

Code Completion in Python: f-strings, formatting.

Related challenges