How to check if all letters in a string are lowercase in Python

1 Answer

0 votes
import string

s = 'python'

if any([letter in s for letter in string.ascii_lowercase]):
    print('yes')
else:
    print('no')


'''
run:

yes

'''

 



answered Nov 19, 2017 by avibootz
...