Avatar ·

How to remove the lines selectively?

📁 python, пример

There is a certain file consisting of lines. It is necessary to remove the strings selectively, starting with a certain set of characters using Python. How to do this?

Here is an example

  atom  14  atom  15  anisou  15  atom  16  anisou  16      

you need to delete everything that begins with anisou