Eric V. Smith added the comment:
Specifically, see: https://www.python.org/dev/peps/pep-0498/#format-specifiers
str.format() also works this way:
>>> '{0:02{1}}'.format(10, an_x)
'0A'
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28827>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com