I have a list of data in form:
myList = ["bytearray(b'hi')", ...]
something like that.
I want to take each value in the list and convert into plain string form. So the given example should output :
hi
I know you do something like this:
data = bytearray(b'hi')
string = data.decode('UTF-8')
I am struggling with converting the initial string into a bytearray object to decode it back into the string. Any help?