[python] Format ints into string of hex