SyntaxFix
Write A Post
Hire A Developer
Questions
This isn't exactly what you asked for but you can use the "hex" function in python:
>>> hex(15) '0xf'