On 01/22/2014 05:24 AM, Adam Hurwitz wrote:
Hi,
This is a coding challenge in the Google Developers Python
Coursehttps://developers.google.com/edu/python/exercises/basic.
I have been working on this challenge for hours without being able to solve.
A. match_ends
# Given a list of strings,
Adam Hurwitz adamhurw...@google.com 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
On Tue, Jan 21, 2014 at 08:24:54PM -0800, Adam Hurwitz wrote:
Hi,
This is a coding challenge in the Google Developers Python
Coursehttps://developers.google.com/edu/python/exercises/basic.
I have been working on this challenge for hours without being able to solve.
A. match_ends
# Given
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
Hi expert,
I want to use pexpect to send ctrl+a+c
how should I do?
self.vm_session.sendline()
how to fill ???
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
On Wed, Jan 22, 2014 at 8:49 AM, lei yang yanglei.f...@gmail.com wrote:
I want to use pexpect to send ctrl+a+c
What's ctrl+a+c? If this is for screen, then I think you mean ctrl+a c:
sendcontrol('a')
send('c')
___
Tutor maillist -
thanks, it works for me
Lei
On Wed, Jan 22, 2014 at 10:35 PM, eryksun eryk...@gmail.com wrote:
On Wed, Jan 22, 2014 at 8:49 AM, lei yang yanglei.f...@gmail.com wrote:
I want to use pexpect to send ctrl+a+c
What's ctrl+a+c? If this is for screen, then I think you mean ctrl+a c:
On Wed, Jan 22, 2014 at 6:40 AM, Alan Gauld alan.ga...@btinternet.com 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
On Tue, Jan 21, 2014 at 2:44 PM, Albert-Jan Roskam fo...@yahoo.com wrote:
Hmmm, number of OS * number of Python versions = a lot of packages. Isn't
a .zip file easiest? Or maybe msi or wininst*) on Windows and .deb on
Linux (with alien that can easily be converted to e.g. rpm).
The egg format
I'm working my way through some of the examples in
http://ivory.idyll.org/articles/advanced-swc/#list-comprehensions
And tried this one:
class MyTrickyIter:
... def __init__(self, thelist):
... self.thelist = thelist
... self.index = -1
...
... def __iter__(self):
... return
On Wed, Jan 22, 2014 at 8:57 PM, Keith Winston keithw...@gmail.com wrote:
I'm working my way through some of the examples in
http://ivory.idyll.org/articles/advanced-swc/#list-comprehensions
And tried this one:
class MyTrickyIter:
... def __init__(self, thelist):
... self.thelist =
On Thu, Jan 23, 2014 at 12:21 AM, Devin Jeanpierre
jeanpierr...@gmail.com wrote:
in Python 3, it should be __next__, not next.
Ah! That's it! Thanks!!!
I'd suggest staying away from any old blog posts and articles, unless
you'd care to learn Python 2.x instead of 3.x. ;)
Yeah, but this is a
12 matches
Mail list logo