Ok, thanks for the reply
It is a pain to build executables for mac if you dont own a mac
Apple does not permit you to run it as a virtual machine either...
I think it would be in their interest to distribute a (crippled) version
that could be used to build software, since
less software is ava
Or you could use actual sets:
>>> colors = set(['red', 'green', 'blue', 'orange', 'fuscia', 'black',
'white'])
>>> subset = set(['red', 'green', 'blue', 'purple'])
>>> subset.intersection(colors)
set(['blue', 'green', 'red'])
Of course, this loses your ordering, but it's otherwise far easier to r
Indeed. That's awfully nice and concise.
On Fri, 29 Oct 2010 09:14:06 -0700, Christopher Barker
wrote:
> On 10/29/10 7:56 AM, Dan Ross wrote:
> > I've been trying to use more list comprehensions recently.
>
> ahh -- then you want something like:
>
> In [15]: colors =
['red','green','blue','ora
On 10/29/10 7:56 AM, Dan Ross wrote:
> I've been trying to use more list comprehensions recently.
ahh -- then you want something like:
In [15]: colors = ['red','green','blue','orange','fuchsia','black','white']
In [16]: subset = ['red','green','blue','purple']
In [17]: [c for c in colors if c
I've been trying to use more list comprehensions recently.
I was just
fleshing something out which brought on my post.
On Fri, 29 Oct 2010
09:15:47 -0400, Henry Olders wrote: When dealing with lists, list
comprehensions are shorter and easier to work with:
l=['red','green','orange','blue','r