Runtime error in python

for i in range(0,T):
len=int(input())
S=int(input())
arr=array(“i”,[])
for j in range(0,len):
temp=S%10
S=int(S/10)
arr.append(temp)
arr=arr[::-1]
a = arr[0]
Y=0
for k in arr:
if k!=a:
break
Y += 1
print(Y)

I am getting a runtime error in this code even if its working. I am new to codechef so idk what’s the matter. Please help me out.

Can you provide the question and your submission.