daf = [2,2]
if all values in the array are the same
print ("error")
else
print(daf.index(max(daf)))
I don't know how to write the if statement for the above code since
daf = [2,2]
print(daf.index(max(daf)))
just returns 0 which is also the first index of the array