Solution does not work for a test case but works fine on PyCharm

facebook
Tags: #<Tag:0x00007f24270875d0>

#1
def findMedianSortedArrays( A, B):
if not A and not B:
    return []
res = list(sorted(merge(A + B)))
l = len(res)
if l % 2 == 0:
    return (res[l//2] + res[l//2 -1]) / 2
else:
    return res[(l-1) //2]