[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] how to change the first character into upper case



On 23/02/12 03:54, David Christensen wrote:
On 02/22/2012 05:18 AM, Lorenzo Sutton wrote:
~$ python -c "print (' '.join([str.capitalize(x) for x in 'NELSON
ARISPE, EDUARDO ROJAS, AND HARVEY B. POLLARD'.split(' ')]))"
Nelson Arispe, Eduardo Rojas, And Harvey B. Pollard
                                ^
I believe the 'A' in "and" should not be capitalized.

Of course:

~$ python -c "print (' '.join([str.capitalize(x) for x in 'NELSON ARISPE, EDUARDO ROJAS, AND HARVEY B. POLLARD'.split(' ')]).replace('And','and'))"
Nelson Arispe, Eduardo Rojas, and Harvey B. Pollard

Lorenzo.


David




Reply to: