I have a lot of exceptions in a if line like this:
if "Aide" not in title and "Accessibilité" not in title and "iphone" not in title and "android" not in title and "windows" not in title and "applications" not in title and "RSS:" not in title:
do_stuff()
How can I write this line to use a list ?
I've tried:
for a in ["Aide", "Accessibilité", "iphone" , "android", "windows", "applications", "RSS:"]:
if title != a:
do_stuff()
But this method calls do_stuff() for each a, so it's not what I would like...
How can I doing this ? Thanks
Aucun commentaire:
Enregistrer un commentaire