Added String.format example
This commit is contained in:
parent
6e12056589
commit
e8f8aed3f5
|
@ -0,0 +1,6 @@
|
||||||
|
fname = "John"
|
||||||
|
lname = "Doe"
|
||||||
|
|
||||||
|
bond_string = "My name is {lastname}, {firstname} {lastname}".format(firstname=fname, lastname=lname)
|
||||||
|
|
||||||
|
print(bond_string)
|
Loading…
Reference in New Issue