-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove_duplicate.py
More file actions
40 lines (35 loc) · 843 Bytes
/
remove_duplicate.py
File metadata and controls
40 lines (35 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 6 13:27:35 2017
@author: stefan
"""
#def remove_duplicates(elements):
# return list(set(elements))
#def remove_duplicates(elements):
# numbers = []
# for x in elements:
# if numbers.count(x) == 0:
# numbers.append(x)
#
# return numbers
#def remove_duplicates(elements):
# numbers = []
# for x in elements:
# if x not in numbers:
# numbers.append(x)
#
# return numbers
#def remove_duplicates(elements):
# numbers = [elements[0],]
#
# for i in range(1,len(elements)):
# isInNumbers = False
# for j in range(0,i):
# if elements[i] == elements[j]:
# isInNumbers = True
# break
#
# if isInNumbers == False:
# numbers.append(elements[i])
#
# return numbers