| | |
How to find minimum value from list that is higher than 0
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
2
#2 Oct 25th, 2009
This should work
Note: this raises ValueError if all temperatures are below 0.
python Syntax (Toggle Plain Text)
value = min(x for x in temperature_sequence if x > 0)
Last edited by Gribouillis; Oct 25th, 2009 at 7:04 am.
![]() |
Similar Threads
- How to recursively find a value in a linked list (Java)
- Selection Sort (C++)
- linked list pls pls help me (C++)
- Linked Lists: Find length and check for empty list (C++)
- Find and return list of applications using the network (VB.NET)
- Find highest value in List (C++)
- Comparing a matrix(list[][]) ? (Python)
- Is there any place where you can find a complete list of python commands? (Python)
- Math tutorial (C++)
Other Threads in the Python Forum
- Previous Thread: Python data validation. Idioms and ideas.
- Next Thread: Cows and Bulls Game - Totally Lost
| Thread Tools | Search this Thread |
Tag cloud for Python
abrupt ansi anti apache approximation array basic beginner book builtin calculator chmod code converter countpasswordentry curved dan08 dictionaries dictionary dynamic examples excel file filename float format ftp function gui heads homework import inches input java launcher library line lines linux list lists loop mouse mysql mysqlquery newb number numbers numeric output parsing path phonebook plugin port prime program programming progressbar projects py2exe pygame pyqt pysimplewizard python random recursion recursive redirect scrolledtext server software ssh stamp statictext statistics string strings table terminal text textarea thread threading time tkinter tlapse trick tuple tutorial twoup ubuntu unicode urllib urllib2 variable windows wordgame wxpython





