You are viewing a single comment's thread. Return to all comments →
it is used beacuse print(hex(14).upper()) --> returns 0XE
and in the output we don't need 0X
so by using list slicing [2:] we get E, thats what is needed.
Seems like cookies are disabled on this browser, please enable them to open this website
String Formatting
You are viewing a single comment's thread. Return to all comments →
it is used beacuse print(hex(14).upper()) --> returns 0XE
and in the output we don't need 0X
so by using list slicing [2:] we get E, thats what is needed.