I have integer number in ex. 16 and i am trying to convert this number to a hex number. I tried to achieve this by using hex function but whenever you provide a integer numb
Using the string formatters (new first, then old):
>>> '{:x}'.format( 12345678 ) 'bc614e' >>> '%x' % ( 12345678 ) 'bc614e'