def to_address(num):
 if (num < 0):
  return to_hex(num)
 if (num > 4294967295):
  return ('0x%016x' % num)
 else:
  return ('0x%08x' % num)

def to_address ( num ) : if ( num < 0 ) : return to_hex ( num ) if ( num > 4294967295 ) : return ( '0x%016x' % num ) else : return ( '0x%08x' % num )
convert a number to address format in hex .