path = 'c:/NeoZQYY/docs/h5_ui/compare/ORCHESTRATION-PLAN.md' with open(path, 'rb') as f: raw = f.read() doc = raw.decode('utf-8').replace('\r\n', '\n') # find the third > line and print its full content lines = doc.split('\n') for i, line in enumerate(lines[:8]): print(i, line.encode('unicode_escape'))