擅长:python、mysql、java
<pre class="lang-python prettyprint-override"><code>thing = [['Promotion not applied', 'Buy1, get 1 for FOR $4.50', '(', 'details', ')'],[],['Promotions Applied:', 'BUY 1, GET 1 FOR $4.50', '(', 'details', ')']]
promo_applied = [_[:2] for _ in thing if 'Promotions Applied:' in _]
promo_not_applied = [_[:2] for _ in thing if 'Promotion not applied' in _]
</code></pre>