Python код:
def func(arr1, arr2):
arr1 = {i for i in arr1}
arr2 = {i for i in arr2}
answ = [i for i in arr1 ^ arr2]
return answ
arr1 = [1, 2, 3, 4, 5]
arr2 = [2, 6, 8, 1, 4]
print(func(arr1, arr2))
Python код:
def func(arr1, arr2):
arr1 = {i for i in arr1}
arr2 = {i for i in arr2}
answ = [i for i in arr1 ^ arr2]
return answ
arr1 = [1, 2, 3, 4, 5]
arr2 = [2, 6, 8, 1, 4]
print(func(arr1, arr2))