Python

ph
Admin (토론 | 기여)님의 2017년 4월 10일 (월) 01:47 판 (→‎is and ==)
이동: 둘러보기, 검색

is and ==

is is identity testing, == is equality testing. what happens in your code would be emulated in the interpreter like this:

>>> a = 'pub'
>>> b = ''.join(['p', 'u', 'b'])
>>> a == b
True
>>> a is b
False

[1]