Format function in python

What does format function do in python?

format() method is used in python to format strings. when ever you are unsure of what to write in a string you can put {} - Curly braces at that position and later on using format() method write the string which you want at the place of those curly braces .
Eg-

print("Hello My name is {}".format("XYZ"))

In the above example the curly braces will be replaced by XYZ .
It has a syntax of -

{} {} . format(value1,value2)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.