擅长:python、mysql、java
<p>对于python 2,使用<a href="https://docs.python.org/2/library/functions.html#filter" rel="nofollow"><strong>filter</strong></a>:</p>
<pre><code>results=[['hgd', '2.96', '4,433,389', '-13.7'], ['bbd.a', '2.25', '1,209,421', '-13.1'], ['mri.u', '8.60', '3,000', '-8.5'], ['iam', '1.06', '1,000', '-7.8'], ['hnd', '21.76', '1,180,466', '-7.6'], ['tth', '0.97', '41,777', '-7.6'], ['bbd.b', '1.89', '32,423,597', '-7.4'], ['bbd.pr.c', '15.20', '43,737', '-7.3'], ['esp', '1.96', '87,604', '-7.1'], ['enl', '34.00', '5,239', '-6.2'], ['rmp', '1.83', '2,688,261', '-5.7'], ['amm', '1.39', '63,301', '-5.4'], ['vrx', '41.83', '1,664,689', '-5.4'], ['xtc', '13.45', '63,453', '-5.3'], ['cxr', '36.48', '1,642,197', '-5.0']]
results = filter(lambda l: l[0].count('.') <= 1, results)
</code></pre>
<p>对于python 3:</p>
<pre><code>results = list(filter(lambda l: l[0].count('.') <= 1, results))
</code></pre>