print hexadecimal in python

 print (hex(value))

Here is what the above code is Doing:
1. It’s creating a list of integers from 0 to 255.
2. It’s converting each integer to a hexadecimal string.
3. It’s printing the hexadecimal string.

You can also use the hex() function to convert a hexadecimal string to an integer.

Here’s an example: