Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,3 +1,7 @@
|
|||
import itertools
|
||||
items = [1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd']
|
||||
unique = [k for k,g in itertools.groupby(sorted(items))]
|
||||
unique = []
|
||||
helperset = set()
|
||||
for x in items:
|
||||
if x not in helperset:
|
||||
unique.append(x)
|
||||
helperset.add(x)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import itertools
|
||||
items = [1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd']
|
||||
unique = []
|
||||
for x in items:
|
||||
if x not in unique:
|
||||
unique.append(x)
|
||||
unique = [k for k,g in itertools.groupby(sorted(items))]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
items = [1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd']
|
||||
unique = []
|
||||
for x in items:
|
||||
if x not in unique:
|
||||
unique.append(x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue