Answers for "python produce string of bytes"

0

python hex to bytes string

hexadecimal_string = "AB"
byte_array = bytearray.fromhex(hexadecimal_string)
print(byte_array)
Posted by: Guest on December-16-2020
9

python convert string to bytes

data = ""  			#string
data = "".encode()	#bytes
data = b"" 			#bytes
data = b"".decode() #string
data = str(b"")  	#string
Posted by: Guest on March-14-2020

Python Answers by Framework

Browse Popular Code Answers by Language