I wonder whether there are some problems with python code in this problem. I tested the input [], [1] in my local environment and get the right answer. But when I submit the code to the oj I got [0], which confused me. Could anyone give me some idea? My code are as follow:

```
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):
pa = 0
pb = 0
while len(A) != pa and len(B) != pb:
if A[pa] > B[pb]:
A.insert(pa,B[pb])
pb += 1
else:
pa += 1
while len(B) != pb:
A.insert(pa,B[pb])
pb += 1
pa += 1
return A
```