Chad Crabtree wrote:
> The second case you show should be true because I believe that's what
> he
> asked for. Here is I believe the correct way to do this.
>
>
l= [ [1], [2,3], [4,5], [6]]
def isin(test,alist):
>
> ... return bool([x for x in alist if test in x])
I don't think so,
Kent Johnson wrote:
>Olli Rajala wrote:
>
>
>>Hi again,
>>
>>I have a '2D array', I mean a list inside a list ([[][],[][],...])
and
>>would need to check if the value exists in it. Of course I could do
a
>>for loop, but that just seem to be a little overkill, so is there
any
>>other way to do it
Olli Rajala wrote:
> Hi again,
>
> I have a '2D array', I mean a list inside a list ([[][],[][],...]) and
> would need to check if the value exists in it. Of course I could do a
> for loop, but that just seem to be a little overkill, so is there any
> other way to do it? I have to check the first
Hi again,
I have a '2D array', I mean a list inside a list ([[][],[][],...]) and
would need to check if the value exists in it. Of course I could do a
for loop, but that just seem to be a little overkill, so is there any
other way to do it? I have to check the first cell of every insider
list.
He