5 Dec 2020

Membership Operators

                            Evaluates to find a value or a variable is in the specified sequence of string, list, tuple, dictionary or not.To check particular item in list or not, in and not in operators are used.
 
                         

Example :
x=[5,3,6,4,1]
>>> 5 in x True
>>> 5 not in x False

No comments:

Post a Comment

Operator precedence

           When an expression contains more than one operator, the order of evaluation depends on the order of operations.            The ac...