擅长:python、mysql、java
<p>相当蹩脚,但工作:</p>
<pre><code>>>> voltages = [50, 100, 150, 200, 250, 200, 150, 100, 50]
>>> threshold_passed = False
>>> for v in voltages:
... if v > 150:
... print v
... threshold_passed = True
... if threshold_passed and v < 150:
... print v
... break
...
170
200
250
200
170
100
</code></pre>