[SciPy-user] finding values in a list?

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Sat Jul 11 17:01:31 EDT 2009


Sorry if this is too simple or even OT, but say I have a list like

[1,2,3,4,5,6,7,8,9]

and I want to get the values just below and above a given value.

So, if I enter 6.2, I get 6 and 7.

but how?

TIA

Carlos

-- 
Carlos Henrique Grohmann - Geologist D.Sc.
a.k.a. Guano - Linux User #89721
ResearcherID: A-9030-2008

http://digitalelevation.blogspot.com

http://www.igc.usp.br/pessoais/guano
_________________
Can’t stop the signal.



More information about the SciPy-User mailing list