Re: [Tutor] Another string-manipulation question

2007-05-09 Thread Kent Johnson
Alan Gilfoy wrote: > Given a string, how would I?: > 2. Make sure that there are no symbols (non-letter, non-number) in the > string, and, if one is found, remove it. > > Pseudocode time, as to a potential approach- > > for each character in the string: > if character not in > "abcdefgh

Re: [Tutor] Another string-manipulation question

2007-05-09 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gilfoy > Sent: Wednesday, May 09, 2007 2:42 PM > To: tutor@python.org > Subject: [Tutor] Another string-manipulation question > > Given a string, how would I?: > &g

[Tutor] Another string-manipulation question

2007-05-09 Thread Alan Gilfoy
Given a string, how would I?: 1. Make sure only the first letter string_name[0], is capitalized. This would involve using string_name.lower() to lowercase everything else, but how do I use .upper(), or some other method, to capitalize only the first character? 2. Make sure that there are no s