Yesterday I gave up QotD after I couldn't decide which way was best. I wrote DecToHexa (n) function, which may be the answer # 1.
According to docs Built-in Functions this may be the answer # 3.
According to Type Conversion in Python, this may be the answer # 4.
But in my life sport sometimes taught me losing too. I swear I haven't looked for the right answer yet, and now I'm boldly answering # 4. Hmm... I got it wrong. Anyway thanks Steve for this funy question. Jeff was right ...
# Function definition is here
result = str(hex(n))
# Now you can call DecToHexa function
n = 254
result = DecToHexa(n);
print('Hexadecimal value of '+ str(n) +' is: ' + result);
Hexadecimal value of 254 is: 0xfe