擅长:python、mysql、java
<p>我将通过降低第一个值的大小写并对照它检查<code>exclusion</code>列表来实现这一点:</p>
<pre class="lang-py prettyprint-override"><code>lowered_exclusion = [excl.lower() for excl in exclusion]
filtered_journeylist = []
for journey in journeylist:
first = journey[0].lower()
if not any(excl in first for excl in lowered_exclusion):
filtered_journeylist.append(journey)
</code></pre>