Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

using in as a logical operator in python

fruit = 'banana'
print('n' in fruit)     # Output: True
print('m' in fruit)     # Output: False
print('nan' in fruit)   # Output: True
if 'b' in fruit:
    print('Found it')   # Output: Found it
Source by www.py4e.com #
 
PREVIOUS NEXT
Tagged: #logical #operator #python
ADD COMMENT
Topic
Name
9+4 =