is
Python (python 3.3) の学習を開始し、演算子を試していました。私はこれを試しました:
>>> b = 'is it the space?'
>>> a = 'is it the space?'
>>> a is b
False
>>> c = 'isitthespace'
>>> d = 'isitthespace'
>>> c is d
True
>>> e = 'isitthespace?'
>>> f = 'isitthespace?'
>>> e is f
False
スペースと疑問符によってis
動作が異なるようです。どうしたの?
編集:を使用する必要があることはわかっていますが、がこのように動作する==
理由を知りたかっただけです。is