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 251 views
1 answer 280 views
1 answer 229 views
3 answers 333 views
333 views asked Apr 30, 2021 by avibootz
3 answers 474 views
1 answer 245 views
2 answers 354 views
354 views asked May 7, 2017 by avibootz
...