How to use multiple or in if statement in Python

1 Answer

0 votes
s = 'python'

if ("r" in s) or ("k" in s) or ("o" in s):
    print('found')
else:
    print('not found')


'''
run:

found

'''

 



answered Nov 2, 2017 by avibootz

Related questions

1 answer 244 views
1 answer 268 views
1 answer 219 views
3 answers 321 views
321 views asked Apr 30, 2021 by avibootz
3 answers 463 views
1 answer 237 views
2 answers 345 views
345 views asked May 7, 2017 by avibootz
...