Formatting strings in Python - more examples

Define variables:

name = "Dmitri"
friend_name = "Nick"
Use without a variable
print("Hello {}".format(name))
print("Hello {}".format("John"))
Use with a variable:
print("Hello {name}".format(name=name))
print("Hello {name}".format(name=friend_name))
print("Hello {name}".format(name="Alice"))