Python, in the case of a def has 2 returns

def func(a, b):
    return a+b
    return a-b
print(func(4, 2))
# 6
# not 6 2

# Even if a function has 2 returns, we only get the first one.
# And the function processing ends after the first return. 

댓글

이 블로그의 인기 게시물

<배당주 투자> 지주사, '22년 8월

<배당주 투자> ETF, ETN, '22년 9월

ISA 계좌의 투자 금액은 얼마로 해야 할까? 3,500만원 이하