पायथन आइडेंटिटी ऑपरेटर्स
पायथन आइडेंटिटी ऑपरेटर्स
पहचान संचालकों का उपयोग वस्तुओं की तुलना करने के लिए किया जाता है, यदि वे समान नहीं हैं, लेकिन यदि वे वास्तव में एक ही वस्तु हैं, तो समान स्मृति स्थान के साथ:
Operator | Description | Example | Try it |
---|---|---|---|
is | Returns true if both variables are the same object | x is y | |
is not | Returns true if both variables are not the same object | x is not y |