#Write your function here

def middle_element(lst):

if len(lst) % 2 == 0:

sum = lst[int(len(lst)/2)] + lst[int(len(lst)/2) - 1] #this part I can’t understand!=(

return sum / 2 # why we need to / by 2?

else:

return lst[int(len(lst)/2)]

#Uncomment the line below when your function is done

print(middle_element([5, 2, -10, -4, 4, 5]))