import reseq = "QPPLSK"find_in_seq = re.findall(r"[^P][PKRHW]", seq)print find_in_seq
Standard input is empty
['QP', 'SK']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!