.format() method in python
The format method is also similar to the f string but has more options than fstrings. Python is a object oriented programming language so you can use this method anywhere.
basic formatting-
Advanced formatting-
here you can control which parameter to use from the arguments entered and also give default arguments by naming in the curly brackets
Other parameters that can be entered in the curly brackets-
This is everything I learnt about the format method in python. Hope you understand it.
Comments
Post a Comment