Pangram is a sentence containing every
letter in the English alphabet.Given a string find all the characters that are
missing from the string i.e , the characters that can make the string pangram .
We need to print the output in alphabetic order
You have to find that character to
make this string pangram
Pangram is a sentence containing every
letter in the English alphabet.Given a string find all the characters that are
missing from the string i.e , the characters that can make the string pangram .
We need to print the output in alphabetic order
You have to find that character to
make this string pangram
Code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ispangram(str): | |
res = "" | |
alphabet = "abcdefghijklmnopqrstuvwxyz" | |
for char in alphabet: | |
if char not in str.lower(): | |
res = res+char | |
res = ''.join(sorted(res)) | |
return res | |
print(ispangram(input())) |
0 Comments
Post a Comment