I am trying to convert big integer number to hexadecimal, but in result I get extra \"0x\" in the beginning and \"L\" at the and. Is there any way to remove them. Thanks. The nu
I think it's dangerous idea to use strip. because lstrip or rstrip strips 0.
lstrip
rstrip
0
ex)
a = '0x0' a.lstrip('0x') ''
result is '', not '0'.
''
'0'
In your case, you can simply use replce to prevent above situation. Here's sample code.
replce
hex(bignum).replace("L","").replace("0x","")