13 lines
244 B
Python
13 lines
244 B
Python
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
|
||
|
def unique(d):
|
||
|
values = []
|
||
|
keys = list(d.keys())
|
||
|
for key in keys:
|
||
|
value = d.get(key, None)
|
||
|
if value in values:
|
||
|
d.pop(key, None)
|
||
|
continue
|
||
|
values.append(value)
|