Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-11-02 19:27:07 +02:00
parent c469b67f0b
commit a2cd6db3b0
22 changed files with 67 additions and 64 deletions

View File

@ -3,9 +3,10 @@ title: all_unique
tags: list,beginner
---
Returns `True` if all the values in a list are unique, `False` otherwise.
Checks if all the values in a list are unique.
- Use `set()` on the given list to remove duplicates, use `len()` to compare its length with the length of the list.
- Use `set()` on the given list to keep only unique occurences.
- Use `len()` to compare the length of the unique values to the original list.
```py
def all_unique(lst):