Performing list(d) on a dictionary returns a list of all the keys used in the dictionary, in insertion order (if you want it sorted, just use sorted(d) instead). To check whether a single key is in the dictionary, use the in keyword.
list(dict.fromkeys(my_list))
from itertools import groupby # необходимо для того чтобы не потерялась последовательность списка
a = 1, 1, "a", "a", 2, 3, 4, 4
r = [x[0] for x in groupby(a)]
for i in r:
print(i)