Explain membership operator in with example.

Question :

Explain membership operator in with example.

Membership operator in returns true if a character exists in the given string, and false other-wise. For example,
>>>  str = "work Hard"
>>> 'w'  in str
True
>>> 'work' in str
True
>>> 'work' in str
False  # because w of work is in small case
>>> 'we' in str
False


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad