mercredi 26 septembre 2018

IF statement condensing multiple OR statements

I have the following line

if 'smoke' in row['product'].lower() or 'grill' in row['product'].lower() or 'choco' in row['product'].lower(): 

I want to add multiple items in the OR clause. ['smoke', 'grill, 'choco', ...], how can I condense the if statement while not losing the logic?

Aucun commentaire:

Enregistrer un commentaire