擅长:python、mysql、java
<p>我已经编写了代码并进行了解释,以使事情更清楚。:)</p>
<pre><code>journeylist = [("uk_Frank_3734823","342-2432-242-2342",2,3434-3434),("uk_joe_3734823","342-2432-242-2342",2,3434-3434)] # Your provided journey list;
exclusion = ["joe","jack","alice"] # Your provided exclusion list;
JourneyList_lowercase = [i[0].lower() for i in journeylist] # Dublicate journey list array in lowercase;
ExclusionList_lowercase = [i.lower() for i in exclusion] # Dublicate exclusion list in lowercase;
Filtered_List = [] # Prepare new list;
for JL in JourneyList_lowercase: # Go trough journey list in lowercase array;
if not any(EXC in JL for EXC in ExclusionList_lowercase): # Check if we have not any exclusion in our journey list;
Filtered_List.append(JL) # If we have not any exclusion in our journey list -> add value to our new prepared list;
print(Filtered_List)
</code></pre>