[Tutor] Selecting from list

2013-07-18 Thread Hs Hs
hi list: In the following list, is there a simply way to find element less than 200 sandwiched between two numbers greater than 1000. a = [3389, 178, 2674, 2586, 13731, 3189, 785, 1038, 25956, 33551] in a, 178 is between 3389 and 2674.  How this particular list can be selected for further

Re: [Tutor] Selecting from list

2013-07-18 Thread Alan Gauld
On 18/07/13 18:27, Hs Hs wrote: hi list: Hi, please don't use an old thread to start a new one. This message appeared under a thread dated back in January. I nearly gave up looking for the unread message that my reader said was there. Start a new thread - you'll get better responses if you

Re: [Tutor] Selecting from list

2013-07-18 Thread Steven D'Aprano
On 19/07/13 10:18, Jim Mooney wrote: On 18 July 2013 10:27, Hs Hs ilhs...@yahoo.com wrote: [...] (sorry this is not homework question. I want to avoid looping, because I have 300K lines to parse through) Thanks Hs. Not sure what you want to do. If you only want to fulfill the test once,