Girish Sahani wrote:
>>I guess it's already the case with lst = [ e for e in lst if e in pairs ]
>>
>>
>>In [1]: lst = (1,2,3,4)
>>
>>In [2]: pairs=(5,)
>>
>>In [3]: lst=[e for e in lst if e in pairs]
>>
>>In [4]: lst
>>Out[4]: []
>
> Yes its working. I realized that i was giving an input which di
Girish Sahani wrote:
(please don't top-post)
> Hey Bruno...you are seeing the wrong post :P...please ignore this and
> check out the one with (corrected) appended at the end...
You should have posted the correction in the same thread.
> Also, i used the list comprehension thingy which u have gi
> I guess it's already the case with lst = [ e for e in lst if e in pairs ]
>
>
> In [1]: lst = (1,2,3,4)
>
> In [2]: pairs=(5,)
>
> In [3]: lst=[e for e in lst if e in pairs]
>
> In [4]: lst
> Out[4]: []
Yes its working. I realized that i was giving an input which didnt satisfy
the condition.
Now
Hey Bruno...you are seeing the wrong post :P...please ignore this and
check out the one with (corrected) appended at the end...
Also, i used the list comprehension thingy which u have given, but now the
problem is python just hangs if my list l4 contains around 50
pairs...considering its not that b