Can you find error guys?


#1

Comment body goes here.class Solution:
# @param A : tuple of integers
# @param B : tuple of integers
# @return a double
def med(self,l,x):
if l%2==0:
return (x[l//2]+x[(l//2)-1])/2
else:
return x[(l//2)+1]

def findMedianSortedArrays(self, A, B):
    l1 = len(A)
    l2 = len(B)
    i = j = k =0
    x = []
    l = l1+l2
        
    
    while(k<(l//2)+1):
        if A[i]<=B[j]:
            x[k]=A[i]
            k+=1
            i+=1
        else:
            x[k]=B[j]
            k+=1
            j+=1
    if l1==0 and l2>0:
        return med(l2,B)
    elif l1>0 and l1==0:
        return med(l1,A)
    else:
        return med(l,x)