It’s time to switch to f-strings in Python. So simple:
name = 'World'
print(f'Hello {name}') # Hello World
Check out Real Python’s explanation, especially the section on expressions within the brackets.
It’s time to switch to f-strings in Python. So simple:
name = 'World'
print(f'Hello {name}') # Hello World
Check out Real Python’s explanation, especially the section on expressions within the brackets.