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


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad