How to check whether a string contains all letters of the alphabet in Python

1 Answer

0 votes
import string

alphabet = set(string.ascii_lowercase)

all_abc = 'The quick brown fox jumps over the lazy dog'

print(set(all_abc.lower()) >= alphabet)

part_of_abc = 'Python Programming'

print(set(part_of_abc.lower()) >= alphabet)





'''
run:

True
False

'''

 



answered Sep 3, 2021 by avibootz

Related questions

1 answer 202 views
1 answer 146 views
2 answers 168 views
4 answers 382 views
2 answers 261 views
...