My issue
This code is passing on online complier when I input values manulally
cook your dish here
t=int(input())
while t>0:
t=t-1
num=int(input())
lst2=
lst=list(map(int,input().split()))
#print(type(lst))
l=len(lst)
count=0
diff=0
if l<num:
print("UNFIT")
else:
for i in range(l-1):
if lst[i+1]-lst[i]>0:
diff=lst[i+1]-lst[i]
count=count+1
if diff>0:
lst2.append(diff)
if count==0:
print("UNFIT")
else:
print(max(lst2))
why this code not passing the test case
My code
# cook your dish here
t=int(input())
while t>0:
t=t-1
num=int(input())
lst2=[]
lst=list(map(int,input().split()))
#print(type(lst))
l=len(lst)
count=0
diff=0
if l<num:
print("UNFIT")
else:
for i in range(l-1):
if lst[i+1]-lst[i]>0:
diff=lst[i+1]-lst[i]
count=count+1
if diff>0:
lst2.append(diff)
if count==0:
print("UNFIT")
else:
print(max(lst2))
Problem Link: Fit to Play Practice Coding Problem