On Fri, 17 Sep 2010 04:27:28 am Michael Powe wrote:
> Hello,
>
> I have two lists.
>
> alist = ['label', 'guid']
>
> blist = ['column0label', 'column1label', 'dimension0guid',
> 'description', 'columnid']
>
> I want to iterate over blist and extract the items that match my
> substrings in alist;
On Thu, Sep 16, 2010 at 12:59:08PM -0600, Vince Spicer wrote:
> On Thu, Sep 16, 2010 at 12:49 PM, Vince Spicer wrote:
> > On Thu, Sep 16, 2010 at 12:27 PM, Michael Powe wrote:
> >> I have two lists.
> >> alist = ['label', 'guid']
> >>
> >> blist = ['column0label', 'column1label', 'dimension0gui
On 9/16/2010 11:27 AM Michael Powe said...
Hello,
I have two lists.
alist = ['label', 'guid']
blist = ['column0label', 'column1label', 'dimension0guid',
'description', 'columnid']
Something like this?
>>> [ ii for jj in alist for ii in blist if jj in ii ]
['column0label', 'column1label', '
On Thu, Sep 16, 2010 at 12:59:08PM -0600, Vince Spicer wrote:
> On Thu, Sep 16, 2010 at 12:49 PM, Vince Spicer wrote:
> > On Thu, Sep 16, 2010 at 12:27 PM, Michael Powe wrote:
> >> alist = ['label', 'guid']
> >> blist = ['column0label', 'column1label', 'dimension0guid',
> >> 'description', 'col
On Thu, Sep 16, 2010 at 12:49 PM, Vince Spicer wrote:
>
>
> On Thu, Sep 16, 2010 at 12:27 PM, Michael Powe wrote:
>
>> Hello,
>>
>> I have two lists.
>>
>> alist = ['label', 'guid']
>>
>> blist = ['column0label', 'column1label', 'dimension0guid',
>> 'description', 'columnid']
>>
>> I want to iter
On Thu, Sep 16, 2010 at 12:27 PM, Michael Powe wrote:
> Hello,
>
> I have two lists.
>
> alist = ['label', 'guid']
>
> blist = ['column0label', 'column1label', 'dimension0guid',
> 'description', 'columnid']
>
> I want to iterate over blist and extract the items that match my
> substrings in alist
Hello,
I have two lists.
alist = ['label', 'guid']
blist = ['column0label', 'column1label', 'dimension0guid',
'description', 'columnid']
I want to iterate over blist and extract the items that match my
substrings in alist; alternatively, throw out the items that aren't in
alist (but, I've had