Published
- 1 min read
how to check if everything inside a list is unique
The solution for this is noted below
how to check if everything inside a list is unique
Solution
len(set(x)) == len(x)
if true :
print("all values of x are unique")
else:
print("not all values of x are unique")
Try other methods by searching on the site. That is if this doesn’t work