Zethex <[EMAIL PROTECTED]> writes: > Thank you a lot! > > Another quick couple of questions. > > How can i make it so it removes special operators such as ? ! or doesnt > include them?
As you are doing lots of string manipulations, I advise you to read the section of the python documentation on strings (link below). This way you will get a good idea of what can be done out of the box with strings in python. http://docs.python.org/lib/string-methods.html (Or type help(str) from the interactive prompt) For the particular task of removing a character, you may be interested in the replace() method. > and > > I need to lowercase the words so should i use sentence = sentence.lower()? Yes. Or you could combine the two by using the translate() method. E.g. >>> table = ''.join(chr(c).lower() for c in range(256)) >>> 'You! are Free??'.translate(table, '!?') 'you are free' HTH -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list