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
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inVisible tests
1
Input
[1,2,3], [4,5,6]Expected
212
Input
[-1,-2,-3], [-4,-5,-6]Expected
-213
Input
[0], [0]Expected
04
Input
[100,200], [100,200]Expected
6005
Input
[], [1,2]Expected
36
Input
[1,2,3,1,2], [0,0,0]Expected
9Focus radio
Paused · SomaFM · Fluid