[Tutor] AttributeError: 'list' object has no attribute 'capitalize'
Norman Khine
norman at khine.net
Wed Jun 20 13:01:30 CEST 2007
thanks, it is as easy as that ;)
Adam A. Zajac wrote:
> On Wed, 20 Jun 2007 12:32:53 +0200
>
> Norman Khine <norman at khine.net> wrote:
>
>> My question is how to get all the words in the string to start with
>> capital letter?
> title() should do it
>
>>>> a = "hello world"
>>>> a.title()
>>>> 'Hello World'
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list