Saturday, March 26, 2016

Python Pangram

# Enter your code here. Read input from STDIN. Print output to STDOUT bit = True s = raw_input() print s dict = {} for j in "abcdefghijklmnopqrstuvwxyz": dict[j] = False for i in s: dict[i.lower()] = True for j in "abcdefghijklmnopqrstuvwxyz": if dict[j] == False: bit = False if bit == False: print "not pangram" else: print "pangram"

No comments:

Post a Comment