ExamVeda
Login
Home
Python Built In Functions
?

What does the built-in function hex() do in Python?

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: Converts an integer to a hexadecimal string.
The hex() function in Python is used to convert an integer to a lowercase hexadecimal string.
For example:
print(hex(15))  # Output: '0xf'
print(hex(255)) # Output: '0xff'
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.