Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fstring

>>> class Confused:
...     def __format__(self, fmt):
...         return f"What is {fmt}?"
...
>>> c = Confused()
>>> f"{c:xyz12}"
'What is xyz12?'
Source by nedbatchelder.com #
 
PREVIOUS NEXT
Tagged: #fstring
ADD COMMENT
Topic
Name
8+3 =