I want to remove an element from list, such that the element contains \'X\' or \'N\'. I have to apply for a large genome. Here is an example:
\'X\'
\'N\'
There is also the method of doing it using filter
lst = filter(lambda x: 'X' not in x and 'N' not in x, list)