
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
What does 'not in' operator do in Python?
In Python, in and not in operators are called membership operators. Their purpose is to check if an object is a member of a certain sequence object like string, list, or tuple. The not in operator returns false if object is present in sequence, true if not found
>>> 'p' not in 'Tutorialspoint' False >>> 'c' not in 'Tutorialspoint' True >>> 10 not in range(0,5)
- Related Articles
- What does 'is not' operator do in Python?
- What does the &= operator do in Python?
- What does the >> operator do in Python?
- What does 'in' operator do in Python?
- What does 'is' operator do in Python?
- What does colon ':' operator do in Python?
- What does "?:" do in Kotlin? (Elvis Operator)
- What does the "===" operator do in Kotlin?
- What Does the // Operator Do?
- What is "not in" operator in Python?
- What is "is not" operator in Python?
- What does the Star operator mean in Python?
- What does the operator || do in a var statement in JavaScript?
- What does the bitwise left shift operator do in Java?
- What does the bitwise right shift operator do in Java?

Advertisements