Re: [Tutor] another better way to do this ?

2014-01-13 Thread Roelof Wobben
I have read all comments and im a little bit confused. About which script are we talkimng about. I have seen a lot. Roelof > From: keithw...@gmail.com > Date: Sun, 12 Jan 2014 16:43:40 -0500 > CC: tutor@python.org > Subject: Re: [Tutor] another better way to do this ? > > On Sun, Jan 12, 2014

Re: [Tutor] Euler Spoiler

2014-01-13 Thread Keith Winston
Danny, thanks for that exposition. I don't have time to absorb it yet,though I will attempt to soon, but I wanted to thank you for your effort in the meantime. Keith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: h

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Keith Winston
On Mon, Jan 13, 2014 at 1:14 AM, Roelof Wobben wrote: > I have read all comments and im a little bit confused. > About which script are we talkimng about. I have seen a lot. I am talking about the script/approach I posted. Others have posted other scripts. Hopefully you have the capacity, with w

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Peter Otten
Peter Otten wrote: > Emile van Sebille wrote: > >> On 01/12/2014 12:21 PM, Peter Otten wrote: >> >> test("axbxc", "abc") >>> True >> test("abbxc", "abc") >>> False >>> >>> Is the second result desired? >> >> No -- the second should match -- you found a test case I didn't... >> >> def t

Re: [Tutor] Euler Spoiler

2014-01-13 Thread Keith Winston
Ah, I got through it. Yes, I started down this path, but didn't dot the i's. Thanks. I'm going to do some more reading on dynamic programming... Keith On Mon, Jan 13, 2014 at 12:51 PM, Keith Winston wrote: > Danny, thanks for that exposition. I don't have time to absorb it > yet,though I will at

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Keith Winston
Yikes, Peter, that's scary. Wow. On Mon, Jan 13, 2014 at 1:22 PM, Peter Otten <__pete...@web.de> wrote: > Peter Otten wrote: > >> Emile van Sebille wrote: >> >>> On 01/12/2014 12:21 PM, Peter Otten wrote: >>> >>> test("axbxc", "abc") True >>> test("abbxc", "abc") False

[Tutor] how to use 2to3

2014-01-13 Thread S Tareq
can you please help me how to use 2to3 on 3.3. i went to the web site follow instraction and it did not work.  # Import statements import random import datetime #Arrays to store the definitions and keywords read from the file keywords=[]; definition=[]; correctAnswer=[]; #Counter for the wrong A

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Roelof Wobben
> From: keithw...@gmail.com > Date: Mon, 13 Jan 2014 12:56:45 -0500 > Subject: Re: [Tutor] another better way to do this ? > To: rwob...@hotmail.com > CC: tutor@python.org > > On Mon, Jan 13, 2014 at 1:14 AM, Roelof Wobben wrote: > > I have read all comments and im a little bit confused. > > Ab

Re: [Tutor] how to use 2to3

2014-01-13 Thread Danny Yoo
On Mon, Jan 13, 2014 at 9:30 AM, S Tareq wrote: > can you please help me how to use 2to3 on 3.3. i went to the web site follow > instraction and it did not work. When asking for debugging help, it is usually a very good idea to provide as much detail about what you exactly did as you can. Specifi

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Alan Gauld
On 13/01/14 18:22, Peter Otten wrote: Peter Otten wrote: In the mean time here is my candidate: def test(a, b): a = iter(a) return all(c in a for c in b) That's pretty close to my original thoughts. But one question. Why explicitly convert string a to an iter? The 'in' test would

Re: [Tutor] another better way to do this ?

2014-01-13 Thread eryksun
On Mon, Jan 13, 2014 at 1:36 PM, Keith Winston wrote: > Yikes, Peter, that's scary. Wow. Yikes, watch the top posting. :) >> In the mean time here is my candidate: >> >> def test(a, b): >> a = iter(a) >> return all(c in a for c in b) Refer to the language reference discussion of compari

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Peter Otten
Alan Gauld wrote: > On 13/01/14 18:22, Peter Otten wrote: >> Peter Otten wrote: > >> In the mean time here is my candidate: >> >> def test(a, b): >> a = iter(a) >> return all(c in a for c in b) > > That's pretty close to my original thoughts. But one question. > Why explicitly convert

Re: [Tutor] another better way to do this ?

2014-01-13 Thread Keith Winston
s*** just got real. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to use 2to3

2014-01-13 Thread Mark Lawrence
On 13/01/2014 17:30, S Tareq wrote: can you please help me how to use 2to3 on 3.3. i went to the web site follow instraction and it did not work. Providing a sizeable wedge of code and stating "it did not work" is pretty useless. But I'd guess that you've run the code *WITHOUT* the -w flag.