Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31794

Re: change the first letter into uppercase (ask)

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.050
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'python': 0.09; 'assumed': 0.09; 'subject:into': 0.09; 'cc:addr:python-list': 0.10; 'string': 0.17; 'wrote:': 0.17; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'regular': 0.27; 'str': 0.29; 'subject:change': 0.33; 'there': 0.35; 'method': 0.36; 'test': 0.36; 'subject: (': 0.36; 'subject:: ': 0.38; 'received:192': 0.39; 'called': 0.39; 'received:192.168': 0.40; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'subject:letter': 0.84
Date Sat, 20 Oct 2012 00:21:14 -0400
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1
MIME-Version 1.0
To contro opinion <contropinion@gmail.com>
Subject Re: change the first letter into uppercase (ask)
References <CA+YdQ_5DAp88HJiQnW9ejDuQGomW5X_b1dUP_sygJB+7s_9iyg@mail.gmail.com>
In-Reply-To <CA+YdQ_5DAp88HJiQnW9ejDuQGomW5X_b1dUP_sygJB+7s_9iyg@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:4RdAPHxMSUZ+OnU7CxrUZ2VwNx3JqPn7xumv3LpXW1a 59d4eoqVuD4NTwZcdXeJEZsxSoaDLu/WnN4WPDFT4KAloxIYmR LKIVNgTQFNYomAyJIiU3Jy4sqRFMI7oGIBRWhRXpIK4tWq8wjW v942/l1tY0YbobdQtkw3uy1eZ91GgMAEVCsbMlP/Wi1HW8ci1c Yq+Ja7RFFjeHZPQ9FuWDRCIjT+uUU4HOJLg0ogcnGLSn18iiR4 KQstIbt4QtsndmLoKjNoBK59pFHnn7JElA/jeO9Fsy2jVm/Jsw nWM+AWk2+M/tUr5zwU5yzDMRCIRJmlg0oyWUSySiyav2CN8Aw= =
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2552.1350706898.27098.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1350706898 news.xs4all.nl 6865 [2001:888:2000:d::a6]:60998
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31794

Show key headers only | View raw


On 10/20/2012 12:09 AM, contro opinion wrote:
> how can i use  regular expression  in  python  to change the string
> "a test of capitalizing"
> into
> "A Test Of Capitalizing"?
>
>

is that (regex) part of the assignment, or just how you assumed you'd
want to do it?

There is a str method already called title().  Check to see if that's
what you want.



-- 

DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: change the first letter into uppercase (ask) Dave Angel <d@davea.name> - 2012-10-20 00:21 -0400

csiph-web