converting an integer less than 10 to "0x" string using str()

edited March 2018 in How To...

hi,

str(1) gives "1" and
str(10) gives "10"

Is there any way to get the string "01" from the integer 1 using str()?

best, prko

Tagged:
Sign In or Register to comment.