• even the last - what's wrong with this?

Question related to mission Even the last


I'm using this:

def checkio(array):

if len(array) > 0: return sum(array[::2])*array[-1] else: return "empty array"

If I put in values and calculate it works, but run and check keeps returning "empty array" and won't accept it.

What am I doing wrong?