Skip to content

Files

Latest commit

dd4f79b · Dec 23, 2022

History

History
15 lines (10 loc) · 337 Bytes

string-format-method.md

File metadata and controls

15 lines (10 loc) · 337 Bytes

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