
저는 reduce 함수를 활용하고자 해서 다음과 같이 코드를 작성했는데요.
def vector_subtraction(*vector_variables):
if vector_size_check(*vector_variables) == False:
raise ArithmeticError
return [reduce(lambda x,y: x-y, zip(*vector_variables))]
튜플과 튜플은 뺄 수 없다며 실행이 되지 않습니다.
reduce 함수를 활용하려면 코드를 어떻게 작성해야 할까요?
comment