Python Membership Operators || membership operators in python, membership operators in python in hindi
Membership Operators in Python
เคฏे เคเคชเคฐेเคเคฐ्เคธ เคिเคธी เคฎाเคจ เคो เคिเคธी เคฆिเค เคเค เคฎाเคจों เคे เคธเคฎूเคน เคैเคธे string, list เคเคฆि เคฎें เคเคธ เคฎाเคจ เคो เคोเคเคคे เคนैं เคเคฐ เคฎाเคจ เคे เคฎिเคฒเคจे เคฏा เคจ เคฎिเคฒเคจे เคชเคฐ True เคฏा False เคฎें เคชเคฐिเคฃाเคฎ เคฆेเคคे เคนैं। เคชाเคฏเคฅเคจ เคฎें เคฎेเคฎ्เคฌเคฐเคถिเคช เคเคชเคฐेเคเคฐों เคा เคเคชเคฏोเค เคฏเคน เคชเคฐीเค्เคทเคฃ เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคि เคोเค เคฎाเคจ เคฏा เคเคฒिเคฎेंเค เคिเคธी เค्เคฐुเคช (เคธीเค्เคตेंเคธ) เคा เคธเคฆเคธ्เคฏ เคนै, เคैเคธे เคธ्เค्เคฐिंเค, เคธूเคी เคฏा เคเคชเคฒ।
เคฎेเคฎ्เคฌเคฐเคถिเคช เคเคชเคฐेเคเคฐों เคा เคเคชเคฏोเค เค เค्เคธเคฐ เคธเคถเคฐ्เคค เคฌเคฏाเคจों เคเคฐ เคฒूเคชों เคฎें เคिเคฏा เคाเคคा เคนै เคคाเคि เคฏเคน เคांเคा เคा เคธเคे เคि เคोเค เคเคฒिเคฎेंเค เคเคธ เคธ्เคฅिเคคि เคे เคเคงाเคฐ เคชเคฐ เคตिเคถिเคท्เค เคाเคฐ्เคฐเคตाเค เคเคฐเคจे เคธे เคชเคนเคฒे เค्เคฐुเคช (เคธीเค्เคตेंเคธ) เคฎें เคฎौเคूเคฆ เคนै เคฏा เคจเคนीं।
These operators find a value in a given set of values like string, list etc. and return the result True or False if the value is found or not found. Membership operators in Python are used to test whether a value or element is a member of a sequence, such as a string, list, or tuple.
Membership operators are often used in conditional statements and loops to check if an element is present in a collection before taking specific actions based on that condition.
-
In Membership ( in )
- Not In Membership ( not in )
In Membership (in):-
เคฏे เคเคชเคฐेเคเคฐ เคिเคธी เคฎाเคจ เคे เคिเคธी เคฆिเค เคเค เคฎाเคจों เคे เคธเคฎूเคน เคฎें เคนोเคจे เคा เคชเคคा เคเคฐเคคे เคนैं เคคเคฅा เคฎाเคจ เคे เคฎिเคฒเคจे เคชเคฐ True เคฆेเคคे เคนैं เค เคจ्เคฏเคฅा False เคฆेเคคे เคนैं। เคชाเคฏเคฅเคจ เคฎें "in" เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคฏเคน เคांเคเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคि เค्เคฏा เคोเค เคฎाเคจ เคिเคธी เคธीเค्เคตेंเคธ (เคैเคธे เคธ्เค्เคฐिंเค, เคธूเคी, เคเคชเคฒ เคฏा เคถเคฌ्เคฆเคोเคถ) เคे เคญीเคคเคฐ เคฎौเคूเคฆ เคนै। เคฏเคน เคเค เคฌूเคฒिเคฏเคจ เคฎाเคจ เคฒौเคाเคคा เคนै, True เคฏा False, เคฏเคน เคฆเคฐ्เคถाเคคा เคนै เคि เคจिเคฐ्เคฆिเคท्เค เคฎाเคจ เค เคจुเค्เคฐเคฎ เคฎें เคฎौเคूเคฆ เคนै เคฏा เคจเคนीं। "in" เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคเคฎเคคौเคฐ เคชเคฐ เคธเคถเคฐ्เคค เคฌเคฏाเคจों เคฎें เคฏเคน เคांเคเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคि เคुเค เคाเคฐ्เคฐเคตाเค เคเคฐเคจे เคธे เคชเคนเคฒे เคกेเคा เคธंเคฐเคเคจा เคฎें เคोเค เคตिเคถेเคท เคฎाเคจ เคฎौเคूเคฆ เคนै เคฏा เคจเคนीं।
เคฏเคนां เคฌเคคाเคฏा เคเคฏा เคนै เคि เคเคช 'เคเคจ' เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคैเคธे เคเคฐ เคธเคเคคे เคนैं:
- 1. เคाँเค เคเคฐเคจा เคि เคोเค เคเคฒिเคฎेंเค เคธ्เค्เคฐिंเค เคฎें เคนै เคฏा เคจเคนीं:
- 2. เคाँเค เคเคฐเคจा เคि เคोเค เคเคฒिเคฎेंเค เคธूเคी เคฎें เคนै เคฏा เคจเคนीं:
- 3. เคाँเค เคเคฐเคจा เคि เคोเค เคुंเคी เคกिเค्เคถเคจเคฐी เคฎें เคนै เคฏा เคจเคนीं:
'เคเคจ' เคเคชเคฐेเคเคฐ เคตिเคญिเคจ्เคจ เคाเคฐ्เคฏों เคे เคฒिเค เคเคชเคฏोเคी เคนै, เคैเคธे เคธंเค्เคฐเคน เคे เคญीเคคเคฐ เคตिเคถिเคท्เค เคกेเคा เคी เคोเค เคเคฐเคจा, เคเคฒिเคฎेंเค เคชเคฐ เคชुเคจเคฐाเคตृเคค्เคคि เคเคฐเคจा, เคฏा เคกिเค्เคถเคจเคฐी เคฎें เคुंเคिเคฏों เคे เค เคธ्เคคिเคค्เคต เคी เคांเค เคเคฐเคจा। เคฏเคน เคธเคถเคฐ्เคค เคांเค เคो เคธเคฐเคฒ เคฌเคจाเคคा เคนै เคเคฐ เคเคชเคे เคोเคก เคो เค เคงिเค เคชเค เคจीเคฏ เคเคฐ เคुเคถเคฒ เคฌเคจा เคธเคเคคा เคนै।
This operator checks whether a value is in a given set of values and returns True if the value is found, otherwise it returns False. The "in" operator in Python is used to check if a value exists within a sequence (such as a string, list, tuple, or dictionary). It returns a Boolean value, True or False, indicating whether the specified value is present in the sequence. The "in" operator is commonly used in conditional statements to test whether a particular value is present in a data structure before taking certain actions.
Here's how you can use the 'in' operator:
- Checking if an element is in a string:
- Checking if an element is in a list:
- Checking if a key is in a dictionary:
The 'in' operator is useful for various tasks, such as searching for specific data within a collection, iterating over elements, or checking for the existence of keys in dictionaries. It simplifies conditional checks and can make your code more readable and efficient.
Not In Membership (not in):-
เคฏे เคเคชเคฐेเคเคฐ เคिเคธी เคฎाเคจ เคे เคिเคธी เคฆिเค เคเค เคฎाเคจों เคे เคธเคฎूเคน เคฎें เคจเคนी เคนोเคจे เคा เคชเคคा เคเคฐเคคे เคนैं เคคเคฅा เคฎाเคจ เคे เคจ เคนोเคจे เคชเคฐ True เคฆेเคคे เคนैं เค เคจ्เคฏเคฅा False เคฆेเคคे เคนैं। เคชाเคฏเคฅเคจ เคฎें 'not in' เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคฏเคน เคांเคเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคि เคोเค เคฎाเคจ เคिเคธी เคธीเค्เคตेंเคธ เคฎें เคฎौเคूเคฆ เคจเคนीं เคนै, เคैเคธे เคि เคธूเคी, เคुเคชเคฒ, เคธ्เค्เคฐिंเค เคฏा เคถเคฌ्เคฆเคोเคถ। เคฏเคฆि เคธीเค्เคตेंเคธ เคฎें เคจिเคฐ्เคฆिเคท्เค เคฎाเคจ เคจเคนीं เคฎिเคฒเคคा เคนै เคคो เคฏเคน 'True' เคเคฐ เคฏเคฆि เคฏเคน เคชाเคฏा เคाเคคा เคนै เคคो 'False' เคฒौเคाเคคा เคนै। เคเคช เคिเคธी เคธीเค्เคตेंเคธ เคฎें เคिเคธी เคตिเคถिเคท्เค เคฎाเคจ เคी เค เคจुเคชเคธ्เคฅिเคคि เคी เคांเค เคเคฐเคจे เคे เคฒिเค 'not in' เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคเคฐ เคธเคเคคे เคนैं, เคो เคธเคถเคฐ्เคค เคฌเคฏाเคจों เคเคฐ เคฒूเคช เคธे เคจिเคชเคเคจे เคे เคฆौเคฐाเคจ เคชाเคฏเคฅเคจ เคฎें เคเค เคธाเคฎाเคจ्เคฏ เคเคชเคฐेเคถเคจ เคนै।
เคฏเคนां เคुเค เคเคฆाเคนเคฐเคฃ เคฆिเค เคเค เคนैं เคเคนां เคเคช `not in` เคเคชเคฐेเคเคฐ เคा เคเคชเคฏोเค เคเคฐ เคธเคเคคे เคนैं:
- เคฏเคน เคांเคเคจा เคि เคोเค เคเคเคเคฎ เคธूเคी เคฎें เคจเคนीं เคนै:
- เคธเคค्เคฏाเคชिเคค เคเคฐเคจा เคि เคोเค เคตเคฐ्เคฃ เคธ्เค्เคฐिंเค เคฎें เคจเคนीं เคนै:
- เคฏเคน เคाँเคเคจा เคि เคोเค เคुंเคी เคถเคฌ्เคฆเคोเคถ เคฎें เคคो เคจเคนीं เคนै:
This operator determines whether a value is not in a given set of values and returns True if the value does not exist, otherwise it returns False. The 'not in' operator in Python is used to check if a value does not exist in a sequence, such as a list, tuple, string, or dictionary. It returns `True` if the specified value is not found in the sequence and `False` if it is found. You can use the 'not in' operator to check for the absence of a specific value in a sequence, which is a common operation in Python when dealing with conditional statements and loops.
Here are a couple of examples of where you can use the `not in` operator:
- Checking if an item is not in a list:
- Verifying if a character is not in a string:
- Checking if a key is not in a dictionary:

Comments
Post a Comment