def ok_mm_primer(primer_seq, all_primer_seqs, primer_mm):
 for curr_pat in all_primer_seqs:
  if (count_mismatches(primer_seq, curr_pat, primer_mm) <= primer_mm):
   return True
 return False

def ok_mm_primer ( primer_seq , all_primer_seqs , primer_mm ) : for curr_pat in all_primer_seqs : if ( count_mismatches ( primer_seq , curr_pat , primer_mm ) <= primer_mm ) : return True return False
check if primer_seq matches any primer within max mismatches .