Python membership operators

Python membership operators

Instructor-svgAl-Mamun Sarkar
Mar 24 , 2020

Use of python membership operators. Python in operator, is operator, and is not operators.

Code:

a = 'Bangladesh'
b = 'desh'
e = 'desh'
c = "Ind"

print(b in a)
print(c not in a)

print(a is b)
print(a is not b)
print(e is b)

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram