big letter -> small letter

Reinhold Birkenfeld reinhold-birkenfeld-nospam at
Tue Jul 6 09:11:44 CEST 2004

vertigo wrote:
> Hello
> How can i change big letter to small letter ?
> When i tried char=char+32 i received error that can not add int to sring.

That's C thinking, you have to get away from that ;)

In Python, there is no "char" type. Every char is a string, and you
can't add an integer to a string.

But, luckily, everything is an object, too, and has useful methods to do
something with the object. In case of your problem, that would be

char = char.lower()


Wenn eine Linuxdistribution so wenig brauchbare Software wie Windows
mitbrächte, wäre das bedauerlich.  Was bei Windows der Umfang eines
"kompletten Betriebssystems" ist, nennt man bei Linux eine Rescuedisk.
  -- David Kastrup in de.comp.os.unix.linux.misc

More information about the Python-list mailing list