Can Someone please help me in this problem (Elevator) - Python

def solve():
count = 0
diff_l = []
real_work = []
for item in lift_movement:
if item!="-1":
real_work.append(int(item))
length = len(real_work)
if length == 1:
print(0)
else:
for i in range(1,length):
diff = real_work[i]-real_work[i-1]
diff_l.append(diff)
for item in diff_l:
if item<0:
count+=1
print(count)
testcases = int(input())
for i in range(testcases):
lift_movement = []
a =input()
n ,m = a.split(" “)
n , m = int(n), int(m)
question = input()
lift_movement = question.split(” ")

solve()

This is my code for The question Elevator. Can someone please tell where I am wrong. I removed -1 becuase they donot matter as long as we hav to find the minimum number of changes