Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

terms for list of substring present in another list python

companies = [['zmpEVqsbCUO1aXStxHkSVA', 'palms-car-wash'],
             ['5T0vKfIJWP1xTnxA7fJ17w', 'meat-and-bread'],
             ['C0d5kzUx6C19mLcxQyhxCA', 'alamo-drafthouse-cinema-'],
             ['ch1ercqwoNLpQLxpTb90KQ', 'boston-tea-stop']]

no_interest = ['museum', 'cinema', 'car']

out = [x for x in companies if all([ni not in x[1] for ni in no_interest])]
print(out)
Comment

PREVIOUS NEXT
Code Example
Python :: hardest python questions 
Python :: how to get index of closest value in list python 
Python :: extract data from json file python 
Python :: reportlab page size a4 
Python :: delete an element by value from a list if it made of white spaces python 
Python :: sort dict by value python 3 
Python :: print() 
Python :: pyplot width 
Python :: remove punctuation python 
Python :: file searching in python 
Python :: print class python 
Python :: Make a basic pygame window 
Python :: alphabet python 
Python :: how to start an exe file in python 
Python :: python how to count number of true 
Python :: pandas rows count 
Python :: python operators 
Python :: hex python add 0 
Python :: ban command in discord.py 
Python :: youtube-dl python get file name 
Python :: urllib.request.urlretrieve 
Python :: pychamrfind and replace 
Python :: get root path python 
Python :: how to fill nan values in pandas 
Python :: dataframe standardise 
Python :: how to select a file in python 
Python :: python remove everything after character 
Python :: get variable name python 
Python :: path to create a text file in python 
Python :: python 3 replace all whitespace characters 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =