Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convert a byte array to string in python

b = bytearray("test", encoding="utf-8")
# here test is encoded into a byte array 
str1 = bytes(b)
# the function bytes decodes it for us !!! 
print(str1)
#thank god for python
 
PREVIOUS NEXT
Tagged: #convert #byte #array #string #python
ADD COMMENT
Topic
Name
5+5 =