[Tutor] lowercase, uppercase
Python
python at venix.com
Sun Dec 11 00:27:31 CET 2005
On Sat, 2005-12-10 at 16:56 -0600, david wrote:
> i am thinking that string.upper and string.lower may be what you are
> looking for.
>>> x = 'This is Some Mixed CaSe TExt'
>>> x.lower()
'this is some mixed case text'
>>> x.upper()
'THIS IS SOME MIXED CASE TEXT'
Unless you are using a very old version of Python, there is no need to
use the string module. the upper and lower methods now built into str
and unicode objects.
--
Lloyd Kvam
Venix Corp
More information about the Tutor
mailing list