I'm trying to code a program that compares elements between two equal lengthed lists, and uses the smallest number for each element and puts it into a new list. This is my code so far:
def func_0(arr_1, arr_2) :
arr_3 = []
if len(arr_1) == len(arr_2) :
for num in arr_1:
arr_3. append (min(min(arr_1), min(arr_2) ) )
return arr_3
else:
print("Try again")
print(func_0( [1, 2,3], [3, 1,5]))
I think what I need to do is add indexes for the append line, but I'm not sure how to do it. Any help will be appreciated.