Suppose I have a string object named greeting
, and has content: 'Good {time}!'
Suppose I then have an another string object named time
, and has content: 'morning'
I know if I now execute:
print(f'Good {time}!')
will print:
Good morning!
But how can I now make greeting
has content: 'Good morning!'