Is there a .tolower() for a string??
Duncan Booth
duncan at NOSPAMrcp.co.uk
Thu Nov 27 04:41:21 EST 2003
Wojtek Walczak <gminick at hacker.pl> wrote in
news:bq345v$97s$1 at nemesis.news.tpi.pl:
> Dnia 26 Nov 2003 10:57:32 -0800, Amy napisa³(a):
> [...]
>> Isn't there a built in method for changing a string to lowercase?
>
>>>> print ''.lower.__doc__
> S.lower() -> string
>
> Return a copy of the string S converted to lowercase.
>
>
> Read the docs!
Also, you could have said 'learn to use the help command, its more
convenient than printing __doc__':
>
>>>> help("".lower)
>Help on built-in function lower:
>
>lower(...)
> S.lower() -> string
>
> Return a copy of the string S converted to lowercase.
>
Another command the OP might have found useful would be help(""), or
help(str) which tell you all about the string methods.
--
Duncan Booth duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
More information about the Python-list
mailing list