Re: big letter -> small letter

Discussion in 'Python' started by Andrew McNamara, Jul 6, 2004.

  1. Andrew McNamara, Jul 6, 2004
    #1
    1. Advertising

  2. Also yourtsring.lower() will correctly handle accented chars according to
    locale, unicode, etc. which is very important !


    >>> 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.

    >>
    >>>>> 'e'.upper()

    >> 'E'
    >>>>> 'E'.lower()

    >> 'e'
    >>>>>

    >
    > For more string goodness, look at the Library Reference Manual...
    >
    > http://docs.python.org/lib/string-methods.html
    >
     
    =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?=, Jul 6, 2004
    #2
    1. Advertising

  3. Pierre-Frédéric Caillaud wrote:

    .... yet another good answer about what you _should_ want to do....
    >>>> 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.


    Everyone else has given better ways to get the answer you want.
    If, however, you are just playing with representations, and
    exploring, you might try, for example:

    char = 'Q'
    print char, chr(ord(char) + 32)

    --
    -Scott David Daniels
     
    Scott David Daniels, Jul 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vertigo

    big letter -> small letter

    vertigo, Jul 6, 2004, in forum: Python
    Replies:
    4
    Views:
    774
    Reinhold Birkenfeld
    Jul 6, 2004
  2. Tony Meyer

    RE: big letter -> small letter

    Tony Meyer, Jul 6, 2004, in forum: Python
    Replies:
    0
    Views:
    511
    Tony Meyer
    Jul 6, 2004
  3. Shaguf
    Replies:
    0
    Views:
    522
    Shaguf
    Dec 24, 2008
  4. Shaguf
    Replies:
    0
    Views:
    480
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    258
    Shaguf
    Dec 26, 2008
Loading...

Share This Page