71. Problem to check elements are unique or not in the given list.

In this Python list program, we will take a user input as a list and check if the elements are unique or not in the given list with the help of the below-given steps.

List elements are unique:

Steps to solve the program
  1. Take a list as input.
  2. Check whether all elements are unique or not from the given list using for loop and if statement.
  3. If even one element repeats in the list break the loop.
  4. If they are unique print True otherwise False.

Output :

Related Articles

Remove duplicate dictionaries from a given list

Remove duplicate sublists from the list

Leave a Comment