Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Python Tutorials: Membership Operators in Python

The membership operators are useful to test for membership in a sequence such as string, lists, tuples and dictionaries.

There are two type of Membership operator:-

  • in
  • not in

1.in

This operators is used to find an element in the specified sequence.

It returns True if element is found in the specified sequence else it returns False.

Examples:-

st1 = “Welcome to devopsschool”

“to” in st1 True

st2 = “Welcome top devopsschool”

“to” in st2 True

st3 = “Welcome to devopsschool”

“subs” in st3 False

2.not in

This operators works in reverse manner for in operator.

It returns True if element is not found in the specified sequence and if element is found, then it returns False.

Examples:-

st1 = “Welcome to devopsschool”

“subs” not in st1 True

st2 = “Welcome to devopsschool”

“to” not in st2 False

st3 = “Welcome top devopsschool”

“to” not in st3 False

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

What is Flask and use cases of Flask?

What is Flask? Flask is an extensible and lightweight web framework for Python. It is designed to be simple and easy to use, making it an excellent…

Read More

What is Tkinter and use cases of Tkinter?

What is Tkinter? Tkinter is a standard Graphical User Interface (GUI ) toolkit that comes with Python. It provides a set of tools and libraries for building…

Read More

What is Matplotlib and use cases of Matplotlib?

What is Matplotlib? Matplotlib is a comprehensive 2D plotting library for the Python programming language. It is widely used for creating static, animated, and interactive visualizations in…

Read More

What is Python-2.7 and use cases of Python-2.7?

What is Python-2.7? Python 2.7 is a version of the Python programming language that was officially released on July 3, 2010. It marked the end of the…

Read More

What is Numpy and use cases of Numpy?

What is Numpy? NumPy, short for Numerical Python, is a powerful open-source library for numerical computing in Python. It gives support for large, multi-dimensional arrays and matrices,…

Read More

What is Pandas and use cases of Pandas?

What is Pandas? Pandas is a data manipulation and analysis open-source library for the Python programming language. It provides data structures for efficiently storing and manipulating large…

Read More