
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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.
- Related Questions & Answers
- What is "not in" operator in Python?
- What is difference in Python operators != and "is not"?
- What is a "null coalescing" operator in JavaScript?
- What is the "double tilde" (~~) operator in JavaScript?
- What is "function*" in JavaScript?
- What is python .. ("dot dot") notation syntax?
- Difference between "new operator" and "operator new" in C++?
- What is "Argument-Dependent Lookup" ("Koenig Lookup") in C++?
- What is "namespace" keyword in PHP?
- What is "out" keyword in Kotlin?
- What does "?:" do in Kotlin? (Elvis Operator)
- What does the "===" operator do in Kotlin?
- What is the difference between "var" and "val" in Kotlin?
- What is the difference between "const" and "val" in Kotlin?
- What is the use of "assert" statement in Python?
Advertisements