Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open("chars", "r") # Open file
- print("F", end="") # Print first letter (given)
- for line in f: # Read all lines
- if "0x" in line:
- line = line.split("= ")
- line = line[1][2:-2] # Sanitise for hex value
- bytesobj = bytes.fromhex(line) # Convert to bytes object
- ascii = bytesobj.decode("ASCII") # Convert to ascii
- print(ascii, end="")
- print("")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement