Skip to content

Commit 69812cf

Browse files
author
Amogh Singhal
authored
Create remove_duplicates_v2.py
1 parent 00499cc commit 69812cf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

remove_duplicates_v2.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def remove_duplicates_v2(arr):
2+
dedupe_arr = []
3+
4+
for i in arr:
5+
if i not in dedupe_arr:
6+
dedupe_arr.append(i)
7+
8+
return dedupe_arr
9+
10+
result = remove_duplicates([0,0,0,1,1,2,2,3,4,5])
11+
print(result)

0 commit comments

Comments
 (0)