Match two string
seq1 = "spam" seq2 = "scam" res = [] for x in seq1: if x in seq2: res.append(x) print res