What is the output of print(hex(255)) in Python?
print(hex(255))
Correct answer
B. 0xff
6 views
B. 0xff
6 views
hex() returns a lowercase hexadecimal string with 0x prefix.
Asked in: Python Interview Data Types
https://docs.python.org/3/library/stdtypes.htmlNot sure why the answer is B? Ask here and get an explanation.