Which fix removes the bug?
name = 'Ada'
print('Hello, {name}')
- Use double quotes instead
- Escape the braces as
{{}} - Call
str(name)before it - Prefix the string:
f'...'
Without the f prefix the braces are printed literally instead of being interpolated.
Play Problem Solving ▸