bytes objectb = b"example"str objects = "example"str to bytesbytes(s, encoding = "utf8")bytes to strstr(b, encoding = "utf-8")an alternative methodstr to bytesstr.encode(s)bytes to strbytes.decode(b)