string formatter python3 code example
Example 1: str.format python 3
print("Sammy the {pr} {1} a {0}.".format("shark", "made", pr = "pull request"))
Example 2: new python string formatting
>>> f'Hello, {name}!'
'Hello, Bob!'
print("Sammy the {pr} {1} a {0}.".format("shark", "made", pr = "pull request"))
>>> f'Hello, {name}!'
'Hello, Bob!'