def sequence_compare_v1(seq1, seq2): """Compare sequences seq1 and seq2 and report all positions in which they fail to match.""" # Determine the length of each sequence len1 = len(seq1) len2 = len(seq2) # Prepare our list of mismatches mismatches = [] # Step through the sequences, checking for mismatches for pos in range(0, min(len1, len2)): if seq1[pos] != seq2[pos]: mismatches.append(pos) return mismatches