In Python 3, you can format a string, for example:
"{0}, {1}, {2}".format(1, 2, 3)
But how to format bytes?
b"{0}, {1}, {2}".format(1, 2, 3)
raises AttributeError: 'bytes' object has no attribute 'format' .
If there is no format method for bytes, how to format or overwrite bytes?
Ecir Hana Mar 29 '13 at 19:54 2013-03-29 19:54
source share