Or you could read the standard library documentation.
Name:
Anonymous2013-03-20 3:10
Use tolower(), as str.find returns a position in the string.
So you can use str.find on the lowercased string, and then return what it really is using the original string.
Name:
Anonymous2013-03-20 3:48
Alright, I got it! Thanks /prog/
However, another question: How about ignoring punctuation without importing string and using string.punctuation()?