How to use hex() without 0x in Python?

The hex() function in python, puts the leading characters 0x in front of the number. Is there anyway to tell it NOT to put them? So 0xfa230 will be fa230.

The code is

    import fileinput
    f = open('hexa', 'w')
    for line in fileinput.input(['pattern0.txt']):
    >>> format(3735928559, 'x')


Back to homepage or read more recommendations: