[Tutor] Errr...Capitalizing Words
Britt Green
britt_green@hotmail.com
Thu, 15 Feb 2001 20:38:58 -0800
Hello,
I'm kind of stuck on something seemingly trivial, and I'm hoping someone can
help me out. Say I have a block of text, all in lower case:
this is some sample text. its all in lower case. there are no capitals in
this block of text. you get the idea, and now i'm just typing to make a lot
of text.
What I want to do with Python is take the first letter of each sentance and
capitalize it. By looking into the string library I've found the
string.capitalize() function. This only seems to work if you know the word
you're trying to use. Then string.capwords() will capitalize each word
instead of just the first one.
Can anyone point me in the right direction for this?
Thanks,
Britt
--
It is pitch black. You are likely to be eaten by a grue.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com