I am looking for replacing ESC, STX, SOH with empty space. These characters getting printed alongside original data as shown in the attached image.
Step-1: First matched the hex byte characters output to below ASCII chart:
Step-2: Then created the list for badData = [SOH=1,ETX=3,ENQ=5,ESC=1B]
Step-3: Implemented the list(filter(lambda x: x not in badData, goodData)) with lambda function to filter out the escape characters.
Step-4: Decode() the goodData