Two List Total

Sometimes data is split across two lists, but you still need one final total, such as sales from two sources. Write a function array_plus_array that takes two lists arr1 and arr2. Return the sum of all numbers from both lists.

Примеры

Ввод
[1, 2, 3], [4, 5, 6]
Вывод
21
Ввод
[-1, -2, -3], [-4, -5, -6]
Вывод
-21
Ввод
[0], [0]
Вывод
0

Нужно реализовать

def array_plus_array(arr1: list[int], arr2: list[int]) -> int:

Теги

listsarraymath
PostgreSQLv16

Тук ще се появи резултатът от изпълнението на кода

Visible tests
1
Input
[1,2,3], [4,5,6]
Expected21
2
Input
[-1,-2,-3], [-4,-5,-6]
Expected-21
3
Input
[0], [0]
Expected0
4
Input
[100,200], [100,200]
Expected600
5
Input
[], [1,2]
Expected3
6
Input
[1,2,3,1,2], [0,0,0]
Expected9
Focus radio
Paused · SomaFM · Fluid