arr=[0,-2,0,-10,2,-1,0,0,3,2,-3] count = 0 for i in range(1,len(arr)): if arr[i]*arr[i-1] < 0: count+=1 print(count)