How do you combine "\ x0" with a number (for example, 5) in python to form "\ x05"?

for example, I now have a variable:
num=5

then I need to fill in the value of this num to the position of the underscore in "x0_". How can I do that?

try 1:
x codeshelper id=0 0% s% (5)
so the x is "\ x05" instead of "x05"

Mar.04,2021

I don't know what you're going to do. We can only draw a picture according to the gourd.

num = 5
x = r'x0%s' % num
print x

x1 = 'x0' + str(num)
print x1

import binascii
num=5
binascii.a2b_hex(str(num).zfill(2))

is that what you want?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37886-2b8f3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37886-2b8f3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?