i was submitting my code for the question although my code is doing exactly the same which was asked i am getting a time limit exceeded error which i cant figure out as i am new to C.P
t=input(“enter no of test cases”)
i=0
while i<t:
a=map(eval,raw_input(" ").split())
print a
l=[]
for i in range(0,len(a)):
for j in range(0,len(a)):
if(a[i]>a[j] and i!=j):
c=a[i]-a[j]
l.append©
elif(a[i]<a[j] and i!=j):
d=a[j]-a[i]
l.append(d)
i=i=1
l.sort()
print l[0]
this is my code please help