Re: [Tutor] updates andcompletion of goals

2007-12-25 Thread Luke Paireepinart
On Dec 24, 2007 8:57 PM, Kirk Bailey <[EMAIL PROTECTED]> wrote: > Windows Wiki self instller with http server tinyweb: > http://www.tinylist.org/WW140A.exe > > Full featured personal wiki for the travelling laptop user. > > My review: Upon initialization of the installation, I read your license ag

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Chris Fuller
I didn't think of that. But for an arbitrary 2D list, you need the asterisk syntax. On Tuesday 25 December 2007 19:00, you wrote: > Chris Fuller wrote: > zip(*[a,b]) > > > > [(4, 8), (3, 6), (2, 3), (6, 3), (7, 2), (9, 7)] > > This can be just zip(a, b) > > Kent ___

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Kent Johnson
Chris Fuller wrote: zip(*[a,b]) > [(4, 8), (3, 6), (2, 3), (6, 3), (7, 2), (9, 7)] This can be just zip(a, b) Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Chris Fuller
The most concise way to do this is to transpose the list (convert a axb array to bxa), then complare the elements that are pairs of one value each of the original lists. You have two lists, a and b.  Put these into a list and you have a 2x6 2d "array". >>> [a,b] [[4, 3, 2, 6, 7, 9], [8, 6, 3, 3

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Ricardo Aráoz
sith . wrote: > sith . wrote: >> Hi, >> I've read the posts on comparing 2 lists and couldn't find the answer to >> my question. >> I have 2 lists >> a = [4,3,2,6,7,9] >> b = [8,6,3,3,2,7] >> How can I determine if the elements in a are larger or smaller than the >> elements in b. >> >> for i in a

[Tutor] how to compare elements of 2 lists

2007-12-25 Thread sith .
"sith ." wrote: > How can I determine if the elements in a are larger or smaller than > the elements in b. > .. > like 2 columns in excel, the third column would be > a new list of boolean values. Can someone help please? Thank you. Hi, in that case, you need to create the third column (list).

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Alan Gauld
"sith ." <[EMAIL PROTECTED]> wrote > I'd like > 4 to 8, > 3 to 6, > 2 to 3 and so on; like 2 columns in excel, the third column would be > a new list of boolean values. results = [ A[n] == B[n] for n in len(A) ] You should check that A and B are equal lengths of course... You could also subst

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread tezlo
"sith ." <[EMAIL PROTECTED]> wrote: > How can I determine if the elements in a are larger or smaller than > the elements in b. > .. > like 2 columns in excel, the third column would be > a new list of boolean values. Can someone help please? Thank you. Hi, in that case, you need to create the t

[Tutor] how to compare elements of 2 lists

2007-12-25 Thread sith .
sith . wrote: > Hi, > I've read the posts on comparing 2 lists and couldn't find the answer to > my question. > I have 2 lists > a = [4,3,2,6,7,9] > b = [8,6,3,3,2,7] > How can I determine if the elements in a are larger or smaller than the > elements in b. > > for i in a: > for u in b: >

Re: [Tutor] how to compare elements of 2 lists

2007-12-25 Thread Ricardo Aráoz
sith . wrote: > Hi, > I've read the posts on comparing 2 lists and couldn't find the answer to > my question. > I have 2 lists > a = [4,3,2,6,7,9] > b = [8,6,3,3,2,7] > How can I determine if the elements in a are larger or smaller than the > elements in b. > > for i in a: > for u in b: >

[Tutor] how to compare elements of 2 lists

2007-12-25 Thread sith .
Hi, I've read the posts on comparing 2 lists and couldn't find the answer to my question. I have 2 lists a = [4,3,2,6,7,9] b = [8,6,3,3,2,7] How can I determine if the elements in a are larger or smaller than the elements in b. for i in a: for u in b: i > u does not retu