get a list printed in hexadecimal notation

Oliver Eichler oliver.eichler at dspsolutions.de
Wed Jul 17 06:07:55 EDT 2002


Hi

Is it possible to print a mixed list with strings and numbers and having the 
numbers printed as hexadecimal notation?

something like:

>>>l = ('spam',10,15,'more spam')
>>>print l
('spam',0xA,0xF,'more spam')

or similar...

The only way I could think of is to write my own print function. Is there an 
easy way?

Oliver





More information about the Python-list mailing list