How to Use the String Format Method str.format() Python has a built-in function that can be called on a string object to format it: str.format() name = 'Ron' print('Bye {}! Take care!'.format(name)) # Bye Ron! Take care! link