How to check if a list of characters is not in a string using Python

1 Answer

0 votes
s = 'python'

chars = set('abcdef')
if any((ch in chars) for ch in s):
    print('found')
else:
    print('not found')


'''
run:

not found

'''

 



answered Nov 2, 2017 by avibootz
...