xxxxxxxxxx
my_tuple = (1, 2, 2, 5, 1, 3, 5, 3)
my_tupele = tuple(set(my_tuple))
print(my_tupele)
xxxxxxxxxx
def remove_dupiclates(list_):
new_list = []
for a in list_:
if a not in new_list:
new_list.append(a)
return new_list
xxxxxxxxxx
word = input().split()
for i in word:
if word.count(i) > 1:
word.remove(i)
xxxxxxxxxx
if mylist:
mylist.sort()
last = mylist[-1]
for i in range(len(mylist)-2, -1, -1):
if last == mylist[i]:
del mylist[i]
else:
last = mylist[i]
# Quicker if all elements are hashables:
mylist = list(set(mylist))
xxxxxxxxxx
tempA = []
uniqueDict = dict()
for key, val in thisdict.items():
if val not in tempA:
tempA.append(val)
uniqueDict[key] = val