python: convert string to byte array,[elem.encode('hex') for elem in str]