create a python program that receives a sentence as an input
create a python program that receives a sentence as an input from the user; if the sentence contains all the letters of the alphabet, the program prints True. if not false
Solution
import re # library for regular expression
sentence = raw_input(\"please enter the sentence: \")
sentence = sentence.lower() # chance the sentence into lowercase
sentence = re.sub(r\'\\s+\', \'\', sentence) # remove all white spaces
list_of_sen = list(sentence) # make an array of charecter from sentence
set_list = set(list_of_sen) # remove all repetative charecter from list
if len(set_list) == 26: # if set list conatains 26 letter print true
print \"True\"
else:
print \"False \"
Here is sample output
nilmadhab@nilmadhab-Inspiron-3542:~/Desktop/chegg/answers$ python all_letters.py
please enter the sentence: I am great
False
nilmadhab@nilmadhab-Inspiron-3542:~/Desktop/chegg/answers$ python all_letters.py
please enter the sentence: Pack my box with five dozen liquor jugs
