I have to strip anything that isn't a letter between a-z (lowercase only) out of a sentence. I wrote this
def breakPhrase(string):
string=string.lower()
for character in string:
if ord(character) < 97 or ord(character) > 122:
string=string.strip(character)
return string
and it works, but only if theres only one punctuation or non alphabetical character. like if I passed "i dont know..." it would only strip out one of the periods, where I need it to strip all of them out. what am I doing wrong?