본문 바로가기

Python

[Python] is vs ==

is

  • 래퍼런스 비교할 때 사용
  • None, True, False 체크할 때 사용

==

  • 값을 비교할 때 사용
  • Integer, String, List, Dict 등 비교할 때 사용

'Python' 카테고리의 다른 글

[Python] GIL(Global Interpreter Lock)  (0) 2021.03.16
[Python]ABC(Abstract Base Class)  (0) 2021.03.11
[Python] django vs flask  (0) 2021.03.11
[Python] @staticmethod vs @classmethod  (0) 2021.03.04
[Python] requests 라이브러리  (0) 2020.09.01