import itertools
def yoba(data, eq):
ndata = []
for v in data:
if not any(map(eq, itertools.repeat(v), ndata)):
ndata.append(v)
return ndata
data = (1, 1.0, 1.0 + 0.0, "1", 2, 2, 2, 1, 2 ** 16, 2 ** 16 + 0)
print(yoba(data, lambda a, b: a == b))
print(yoba(data, lambda a, b: a is b))
print(yoba(data, lambda a, b: a == b and type(a) is type(b)))
aW1wb3J0IGl0ZXJ0b29scwoKCmRlZiB5b2JhKGRhdGEsIGVxKToKCiAgICBuZGF0YSA9IFtdCiAgICBmb3IgdiBpbiBkYXRhOgoKICAgICAgICBpZiBub3QgYW55KG1hcChlcSwgaXRlcnRvb2xzLnJlcGVhdCh2KSwgbmRhdGEpKToKCiAgICAgICAgICAgIG5kYXRhLmFwcGVuZCh2KQoKICAgIHJldHVybiBuZGF0YQoKZGF0YSA9ICgxLCAxLjAsIDEuMCArIDAuMCwgIjEiLCAyLCAyLCAyLCAxLCAyICoqIDE2LCAyICoqIDE2ICsgMCkKcHJpbnQoeW9iYShkYXRhLCBsYW1iZGEgYSwgYjogYSA9PSBiKSkKcHJpbnQoeW9iYShkYXRhLCBsYW1iZGEgYSwgYjogYSBpcyBiKSkKcHJpbnQoeW9iYShkYXRhLCBsYW1iZGEgYSwgYjogYSA9PSBiIGFuZCB0eXBlKGEpIGlzIHR5cGUoYikpKQo=
[1, '1', 2, 65536]
[1, 1.0, 1.0, '1', 2, 65536, 65536]
[1, 1.0, '1', 2, 65536]