I'm using Python to script some operations on specific locations in memory (32 bit addresses) in an embedded system.
When I'm converting these addresses to and from strings, integers and hex values a trailing L seems to appear. This can be a real pain, for example the following seemingly harmless code won't work:
if longNum[-1] == "L":
longNum = longNum[:-1]
If you do the conversion to hex using
"%x" % 4220963601
there will be neither the
0x nor the trailing