简体   繁体   中英

highlighting and saving multiple words in a single string using python

I'm pretty new to programming and I've been having a problem: I have a txt file with a long (30,000+ chars) single string made of 4 letters (a DNA sequence) and I need to search that file for certain repeats (for example 'TTAGGG' ), highlight them and save as a simple readable file. obviously I can't save it as a txt file because there is no highlight option.

I tried html as well as docx but every search I try removes the previous highlights.

Does anyone have any suggestions?

Open it in MS-Word, and do following Find-and-replace:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM