Is there a standard way in Python to titlecase a string (i.e. words start with uppercase characters, all remaining cased characters have lowercase) but leaving articles like
There are these methods:
>>> mytext = u'i am a foobar bazbar' >>> print mytext.capitalize() I am a foobar bazbar >>> print mytext.title() I Am A Foobar Bazbar
There's no lowercase article option. You'd have to code that yourself, probably by using a list of articles you want to lower.