vendredi 19 février 2016

Using "if not" with multiple string arguments Python

This should be a pretty easy one for somebody to answer, but I've been unable to find a similar response when using strings.

Here is what I currently have, which is not working:

if "Forwarder" not in shp_name or "T_" not in shp_name or "Grad" not in shp_name:

I've also tried:

if ("Forwarder", "T_", "Grad") not in shp_name:

Any help is appreciated, thanks!

Aucun commentaire:

Enregistrer un commentaire