[Tutor] AttributeError: 'list' object has no attribute 'capitalize'

Adam A. Zajac strider1551 at gmail.com
Wed Jun 20 12:38:09 CEST 2007


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'


More information about the Tutor mailing list