[python] difference between is not and !=

sihwan_e·2022년 3월 7일
0

is 와 is not 은 객체를 비교
== 와 != 는 값만 비교

1 == 1.0 -> True
1 != 1.0 -> False

1 is 1.0 -> False
1 is not 1.0 -> True
profile
Sometimes you gotta run before you can walk.

0개의 댓글