[Tutor] str format conversion help
eMyListsDDg
emylistsddg at gmail.com
Wed Jul 14 20:35:02 CEST 2010
'\x00\x11\xb2\x00@,O\xa4'
the above str is being returned from one key/value pair in a dictionary. it is the addr of a network device.
i want to store the addr's in their 8byte mac format like this,
[00 11 b2 00 40 2C 4F A4]
the combinations of format strings using the print statement hasn't resulted in what i need.
looking for a suggestion on how to format this, '\x00\x11\xb2\x00@,O\xa4' into this [00-11-B2-00-40-2C-4F-A4]
tia
Best regards,
eMyListsDDg mailto:eMyListsDDg at gmail.com
More information about the Tutor
mailing list