On 18 Mar, 15:19, [EMAIL PROTECTED] wrote:
> Is there a function in Python analogous to the "where" function in
> IDL?
>
> x=[0,1,2,3,4,2,8,9]
> print where(x=2)
>
> output:
> [2,5]

You can try this:

print filter( lambda x: a[x]==2, range(len(a)))

However it's not the best solution...

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to