You can include the values of an expression inside a string with Python formatted string literals, also known as f-strings
. You have to prefix the string with f
or F
and write expressions like { expression }
.
name = 'Ron'
print(f'Hi {name}! How Are You?')
# Hi Ron! How Are You?