The list comprehension [j-x[i]==0 for i,j in enumerate(x[1:])]
will produce a list of boolean elements. The return value must be a boolean scalar rather than a list. It is obtained by OR-ing all elements. How to do so?
def has_same_adjecent(x):
if len(x)<2:
return False
return [j-x[i]==0 for i,j in enumerate(x[1:])]
has_same_adjecent([3,1,3,3])# must return True