NZEC error in python

n,k=map(int,raw_input().split())
arr=[0]*k
z=0
for i in xrange(0,k):
s1=str(raw_input())
if s1.lower()==“closeall”:
arr=[0]*k
z=0
else:
if arr[int(s1[5])-1]==1:
arr[int(s1[5])-1]=0
z-=1
else:
z+=1
arr[int(s1[5])-1]=1
print z

//