tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,2 @@
|
|||
items = [1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd']
|
||||
unique = list(set(items))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
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))]
|
||||
|
|
@ -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