data = "" #string data = "".encode() #bytes data = b"" #bytes data = b"".decode() #string data = str(b"") #string
a_string = "abc" encoded_string = a_string. encode() byte_array = bytearray(encoded_string) print(byte_array)