How to use multiple and in if statement in Python

1 Answer

0 votes
s = 'python'

if ("h" in s) and ("y" in s) and ("o" in s):
    print('found')
else:
    print('not found')


'''
run:

found

'''

 



answered Nov 2, 2017 by avibootz

Related questions

1 answer 257 views
1 answer 219 views
3 answers 322 views
322 views asked Apr 30, 2021 by avibootz
3 answers 464 views
1 answer 245 views
1 answer 238 views
2 answers 345 views
345 views asked May 7, 2017 by avibootz
...