- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is "is not" operator in Python?
In Python is not membership operator evaluates to false if the variables on either side of the operator point to the same object and true otherwise. For example −
>>> a = 10 >>> b = 20 >>> id(a), id(b) (1581561184, 1581561504) >>> a is not b True
Since id() of variables a and b are different is not operator returns true.
Advertisements