How to convert a number to hex number?
Daniel Evers
daniel.evers at rwth-aachen.de
Tue Nov 8 04:41:39 EST 2005
More information about the Python-list mailing list
Tue Nov 8 04:41:39 EST 2005
- Previous message (by thread): How to convert a number to hex number?
- Next message (by thread): How to convert a number to hex number?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi! Try hex: >>> hex(120) '0x78' Consider converting string -> int using the int()-function: >>> print int.__doc__ int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. If the argument is outside the integer range a long object will be returned instead. Daniel
- Previous message (by thread): How to convert a number to hex number?
- Next message (by thread): How to convert a number to hex number?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list