Anyone could help me to solve this problem?

nums1[end] = nums2[l2], IndexError: list assignment index out of range

```
def merge(self, A, m, B, n):
"""
:type nums1: List[int]
:type m: int
:type nums2: List[int]
:type n: int
:rtype: void Do not return anything, modify nums1 in-place instead.
"""
l1, l2, end = m - 1, n - 1, m + n - 1
while l1 >= 0 and l2 >= 0:
if nums2[l2] > nums1[l1]:
nums1[end] = nums2[l2]
l2 -= 1
else:
nums1[end] = nums1[l1]
l1 -= 1
end -= 1
if l1 < 0:
nums1[:l2 + 1] = nums2[:l2 + 1]
```