Write a python function to check if all elements in a list are unique or not


Topic: Write a python function to check if all elements in a list are unique or not

Solution

def unique(l):
    if len(l)==len(set(l)):
        print("All elements are unique")
    else:
        print("List has duplicates")



List all Python Programs