How to convert a number to hex number?

Paul Rubin http
Tue Nov 8 11:07:34 EST 2005


"dcrespo" <dcrespo at gmail.com> writes:
> >>>hex(255)[2:]
> 'ff'

'%x'%255 is preferable since the format of hex() output can vary.  Try hex(33**33).



More information about the Python-list mailing list