beginner here-- Given a string, my code must detect whether or not it is a pangram. Return True if it is, False if not.It should ignore numbers and punctuation.
When given "ABCD45EFGH,IJK,LMNOPQR56STUVW3XYZ" it returns none and when given "This isn't a pangram! is not a pangram." it returns True when the answer should be False.
This isn't a pangram! is not a pangram. What am I not seeing?
import string
def is_pangram(s):
singlechar = set(s)
list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for index, item in enumerate(singlechar):
if item in list:
list.remove(item)
if list:
return True
break
if not list:
return False