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 261 views
1 answer 226 views
3 answers 330 views
330 views asked Apr 30, 2021 by avibootz
3 answers 470 views
1 answer 248 views
1 answer 241 views
2 answers 350 views
350 views asked May 7, 2017 by avibootz
...