how to compare list in python?,result.append(b[index])