Membership

In operator

The membership operator in checks if the key is present in the dictionary and returns True, else it returns False.

Example:

[Computer Science Class 11] Dictionary Operations - Teachoo - Concepts

Not in operator

The not in operator returns True if the key is not present in the dictionary , else it returns False.

Example:

part 2 - Dictionary Operations - Concepts - Chapter 10 Class 11 - Tuples and Dictionaries - Computer Science - Class 11

Remove Ads Share on WhatsApp
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo