My issue
t=int(input())
while t:
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=0
d=0
o=
y=
for h in range(0,n):
if a[h]>=1:
c+=1
elif a[h]==0:
o.append(c)
c=0
if b[h]>=1:
d+=1
elif b[h]==0:
y.append(d)
d=0
if max(o)>max(y):
print(“OM”,c)
elif max(o)<max(y):
print(“Addy”,d)
else:
print(“DRAW”)
t-=1
how my list is emty
My code
# cook your dish here
t=int(input())
while t:
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=0
d=0
o=[]
y=[]
for h in range(0,n):
if a[h]>=1:
c+=1
elif a[h]==0:
o.append(c)
c=0
if b[h]>=1:
d+=1
elif b[h]==0:
y.append(d)
d=0
if max(o)>max(y):
print("OM",c)
elif max(o)<max(y):
print("Addy",d)
else:
print("DRAW")
t-=1
Learning course: Arrays using Python
Problem Link: Practice Problem in - CodeChef