Answers for "python char to hex"

0

python char to hex

tmp = "hello world"

print("".join(["{:02x}".format(ord(c)) for c in tmp]))
Posted by: Guest on March-05-2021
0

get hex code of character python

hex(ord("c"))
Posted by: Guest on December-23-2020
0

get hex code of character python

import codecs
codecs.encode(b"c", "hex")
Posted by: Guest on December-23-2020
0

python char to hex

import codecs
x = codecs.encode(b"c", "hex")
print(x)
# b'63'
Posted by: Guest on December-31-2020

Python Answers by Framework

Browse Popular Code Answers by Language