I'm a python beginner and would like to learn how to get the names of the elements in a list. For example, if I have
input = [1, 1, 1, 2.5, 2.5, 'a', 'a']
then I'd like to get
output = [1, 2.5, 'a']
If anyone could help, I'd be very grateful.