Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
hex(255), int(‘FF’, 16), 0xFF

What will be the output of the following Python code?
hex(255), int(‘FF’, 16), 0xFF
a) [0xFF, 255, 16, 255]
b) (‘0xff’, 155, 16, 255)
c) Error
d) (‘0xff’, 255, 255)

Answer: d
Explanation: The code shown above converts the value 255 into hexadecimal, that is, 0xff. The value ‘FF’ into integer. Hence the output of the code shown is: (‘0xff’, 255, 255).

Join The Discussion