프로그래밍/CodeSignal
[Intro] areEquallyStrong
CHIqueen
2020. 3. 17. 16:45
def areEquallyStrong(yourLeft, yourRight, friendsLeft, friendsRight):
return (yourLeft == friendsLeft or yourLeft == friendsRight) and (yourRight == friendsLeft or yourRight == friendsRight)
굉장히 쓰잘떼기 없어보이지만 통과다
return {yourLeft, yourRight} == {friendsLeft, friendsRight}
파이썬의 set을 잘 사용한 예시