# just turn it into a set and then convert again into a list res = list(set(lst1))) # now check the lengths of the two lists print(len(res)) print(len(lst1))