Answers for "python from string to bytes to hex"

0

python from string to bytes to hex

import codecs
is_string = " "
is_bytes = is_string.encode()
is_hex = codecs.encode(is_bytes, "hex")
print(is_hex)
# b'20'
Posted by: Guest on December-31-2020

Python Answers by Framework

Browse Popular Code Answers by Language