Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27635 > unrolled thread
| Started by | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| First post | 2012-08-22 10:29 -0400 |
| Last post | 2012-08-22 10:29 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: help me debug my "word capitalizer" script Joel Goldstick <joel.goldstick@gmail.com> - 2012-08-22 10:29 -0400
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2012-08-22 10:29 -0400 |
| Subject | Re: help me debug my "word capitalizer" script |
| Message-ID | <mailman.3649.1345645757.4697.python-list@python.org> |
On Wed, Aug 22, 2012 at 9:00 AM, Santosh Kumar <sntshkmr60@gmail.com> wrote: > OK! The bug one fixed. Thanks to Andreas Perstinger. > > Let's move to Bug #2: > 2. How do I escape the words that are already in uppercase? For example: > > The input file has this: > NASA > > The script changes this to: > Nasa > > Is it possible to make this script look at a word, see if its first > character is capitalized, if capitalized then skip that word. If not > do the processing? I don't wan to use regex? Do I need it? > -- > http://mail.python.org/mailman/listinfo/python-list Go into your python shell and type help(str) or lookup the documentation on the python site about strings http://docs.python.org/library/string.html There are methods to tell if a word is all caps, or if the first letter is capitalized -- Joel Goldstick
Back to top | Article view | comp.lang.python
csiph-web