0x
is used for literal numbers. "\x"
is used inside strings to represent a character
>>> 0x41
65
>>> "\x41"
'A'
>>> "\x01" # a non printable character
'\x01'
0x
is used for literal numbers. "\x"
is used inside strings to represent a character
>>> 0x41
65
>>> "\x41"
'A'
>>> "\x01" # a non printable character
'\x01'