On Wed, Aug 22, 2012 at 12:41 PM, Chris Angelico <[email protected]> wrote: > Why less? Why not just redirect input? Yeah, my bad, I somehow used to do it, for grep too, and I know that this is slower
> Though, this isn't really on topic for Python.
I would still go with regexp, something like:
with open('myfile.txt', 'rw) as file:
print "".join(re.sub(r'\w{3,}', lambda(match):
match.group(0).title(), line) for line in file)
--
http://mail.python.org/mailman/listinfo/python-list
