Hello,
I am working with a netcdf file and trying to remove a long string
from it e.g.
"KAST BLAH BLAH BLAH BLAH DATA BLAH DATA BLAH BLAH BLAH BLAH BLAH DATA
BLAH DATA BLAH"
Right now what I have works, but takes a long time to run... I think
this could be cut down to a quick 2 second run, but no
On Mar 18, 10:48 pm, [EMAIL PROTECTED] wrote:
> vorticitywo:
>
> > Is there a function in Python analogous to the "where" function in
> > IDL?
>
> Python gives very elastic syntax, you can simply do:
>
> data = [0,1,2,3,4,2,8,9]
> print [pos for pos, el in enumerate(data) if el==2]
>
> Bye,
> bearo
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]
--
http://mail.python.org/mailman/listinfo/python-list