Re: [Tutor] Stuck on Challenge in Google Python Class

2014-01-22 Thread Keith Winston
On Wed, Jan 22, 2014 at 6:40 AM, Alan Gauld wrote: >> else: >>return ' ' > > > Notice that this return will throw you out of the function so > you don't process any more strings. You might like to look > at 'continue' as an alternative. You actually don't need to do anything with thi

Re: [Tutor] Stuck on Challenge in Google Python Class

2014-01-22 Thread Alan Gauld
On 22/01/14 04:24, Adam Hurwitz wrote: A. match_ends # Given a list of strings, return the count of the number of # strings where the string length is 2 or more and the first # and last chars of the string are the same. Notice that you are asked to *return* a number not print it. Also notice t

Re: [Tutor] Stuck on Challenge in Google Python Class

2014-01-22 Thread Steven D'Aprano
On Tue, Jan 21, 2014 at 08:24:54PM -0800, Adam Hurwitz wrote: > Hi, > > This is a coding challenge in the Google Developers Python > Course. > I have been working on this challenge for hours without being able to solve. > > A. match_ends >

Re: [Tutor] Stuck on Challenge in Google Python Class

2014-01-22 Thread Dave Angel
Adam Hurwitz Wrote in message: > Many times when a function doesn't work, and you can't figure out why, it pays to factor the function, at least temporarily, and test the different parts. This might be your best bet in this case, especially when I tell you that you're very close. I the

Re: [Tutor] Stuck on Challenge in Google Python Class

2014-01-22 Thread spir
On 01/22/2014 05:24 AM, Adam Hurwitz wrote: Hi, This is a coding challenge in the Google Developers Python Course. I have been working on this challenge for hours without being able to solve. A. match_ends # Given a list of strings, retu