Skip to content

Commit cacf1f3

Browse files
Create Checking python
This is the fastest way to check for repeating values in the list
1 parent 347466f commit cacf1f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: Checking python

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def check_duplicate(lst):
2+
return len(lst) != len(set(lst))
3+
check_duplicate([1,2,3,4,5,4,6]) # True
4+
check_duplicate([1,2,3]) # False
5+
check_duplicate([1,2,3,4,9]) # False

0 commit comments

Comments
 (0)