I am working on a python / beautifulsoup web scraper. I am looking for specific keywords, my expression looks like this:
if 'tribe' in entry or 'ai1ec' in entry or 'tfly' in entry:
print('Plugin Found!')
rating = easy
sheet.cell(row=i, column=12).value = rating
I would like to know which of these keywords makes the statement true. My first instinct would be to write a nested loop to test, but I was not sure if there is a way to capture the value that makes the statement true, which will include less code?
source
share