s = ["ass", "asss"] ln = len(s) lnS = len(list(set(s))) if ln == lnS: print("List is distinct") else: print("List isn't distinct")