i need to Write a function that takes a list of any size as an argument, and returns a list where all adjacent, equal elements have been reduced to a single element. For example [1, 2, 2, 3] would return as [1, 2, 3].
this needs to be done in python
yes this is class work
i'm not really sure on what to do for some of this.
def func1(x):
list1 = x
for i in x:
for n in list1:
if i == n:
list2 = i
print(list2)
return;
a = [1,2,2,3]
func1(a)