if i have
a='x02'
how can i make
b='\x02'
if i do
b="\"+ a
i have an error SyntaxError: EOL while scanning string literal
if i do
b="\\"+a
print(b)
b='\\x02'
which has \\ instead of \
if i do
ord('\x02') results in 2
str='\\'+'x02'
ord(str) gives error
a='x02'
how can i make
b='\x02'
if i do
b="\"+ a
i have an error SyntaxError: EOL while scanning string literal
if i do
b="\\"+a
print(b)
b='\\x02'
which has \\ instead of \
if i do
ord('\x02') results in 2
str='\\'+'x02'
ord(str) gives error