python_introduction/examples/string_format.py

7 lines
152 B
Python

fname = "John"
lname = "Doe"
bond_string = "My name is {lastname}, {firstname} {lastname}".format(firstname=fname, lastname=lname)
print(bond_string)