-
set을 만들지 않고 list 차집합 구하기(for in if not in)Algorithm/python tip 2021. 3. 1. 13:03
_lost = [l for l in lost if l not in reserve] _reserve = [r for r in reserve if r not in lost]
'Algorithm > python tip' 카테고리의 다른 글
1679. Max Number of K-Sum Pairs (0) 2021.03.01 137. Single Number II (0) 2021.03.01 1726. Tuple with Same Product (0) 2021.03.01 1765. Map of Highest Peak (0) 2021.03.01 1052. Grumpy Bookstore Owner (0) 2021.02.28