String Formatting - ArtezGDA/Algorithmic-Nature GitHub Wiki
String Formatting is an operation in a computer program to format a text string, based on one or more dynamic variables. This can be compared with using a Template with placeholders: the value of the placeholders are filled into the template when the string is formatted.
In python these are the most used types of placeholders:
%sfor String%dfor Integer digit%ffor Float
Example:
"To buy %d %s will cost you %f" % (3, "beers", 7.5)
outputs:
'To buy 3 beers will cost you 7.500000'
See (pyformat.info)[https://pyformat.info] for more documentation