Added String.format example

This commit is contained in:
Steve De Jongh 2021-10-27 20:11:34 +02:00
parent 6e12056589
commit e8f8aed3f5
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
fname = "John"
lname = "Doe"
bond_string = "My name is {lastname}, {firstname} {lastname}".format(firstname=fname, lastname=lname)
print(bond_string)