python string interpolation format code example
Example 1: python string interpolation
name = 'World'
program = 'Python'
print(f'Hello {name}! This is {program}')
Example 2: new python string formatting
>>> f'Hello, {name}!'
'Hello, Bob!'
name = 'World'
program = 'Python'
print(f'Hello {name}! This is {program}')
>>> f'Hello, {name}!'
'Hello, Bob!'