I ran my code on my terminal and leetcode OJ respectively, but I can only get correct result on my terminal.

For instance input is ( [],0,[1],1). The result on my terminal is [1], but the result on leetcode OJ is [0].

I don't know why. Is the reason that leetcode cannot use append and extend?

```
class Solution:
# @param A a list of integers
# @param m an integer, length of A
# @param B a list of integers
# @param n an integer, length of B
# @return nothing
def merge(self, A, m, B, n):
if m == 0:
for i in range(0,n):
A.append(B[i])
elif n == 0:
pass
else:
C = []
a = 0
b = 0
while(a < m and b < n):
if A[a] <= B[b]:
C.append(A[a])
a += 1
else:
C.append(B[b])
b += 1
if a == m:
C.extend(B[b:])
else:
C.extend(A[a:])
for x in range(0,m+n):
A[x] = C[x]
```