1print("Hello {planet}".format(planet='World'))
2
3#or
4
5i = "Hello"
6
7print("{word} World".format(word= i ))
1from string import Template
2poem = Template('$x are red and $y are blue')
3
4print(poem.substitute(x='roses', y='violets'))
5#>>>roses are red and violets are blue