making all letters Caps/Small Letters

M

Merrigan

Hi There,

I'm sure I have done this before, but cannot remember how, or find out
how to do it quickly - but is there a way/function/something in python
to make all the letters of a raw_input() string small/capital letters?

Thanks!

-- Merrigan
 
P

Peter Otten

Merrigan said:
I'm sure I have done this before, but cannot remember how, or find out
how to do it quickly - but is there a way/function/something in python
to make all the letters of a raw_input() string small/capital letters?
Typing

in the interactive interpreter gives you a list of candidates. If you
think that "title" is a good candidate try it with
'Alpha Beta'

Probably not what you want, but there are more.

Peter
 
D

David Tweet

"THIS IS A STRING".lower()
'this is a string''THIS IS A STRING'

You can browse all the string methods by doing
 
M

Martin Blume

I'm sure I have done this before, but cannot remember how,
or find out how to do it quickly - but is there a
way/function/something in python to make all the letters
of a raw_input() string small/capital letters?
"upper might help".upper()
"OR LOWER".lower()

HTH
Martin
 
C

Chris

Hi There,

I'm sure I have done this before, but cannot remember how, or find out
how to do it quickly - but is there a way/function/something in python
to make all the letters of a raw_input() string small/capital letters?

Thanks!

-- Merrigan

as it's a string, it supports string functions.
..upper()
..lower()
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top