2012/7/20 Walter Valenti <[email protected]>
> In un array di stringhe. Posso sempre infilarli in un tupla.
>
Una roba così con la funzione all non ti garba?
>>> import re
>>> s = ["12", "ab", "ZZ"]
>>> all(re.match(".*%s.*"%e, "abcZZxx12") for e in s)
True
>>> all(re.match(".*%s.*"%e, "abcZZxx1") for e in s)
False
Ciao.
Marco.
--
http://beri.it/ - Un blog
http://beri.it/i-miei-libri/ - Qualche libro
_______________________________________________
Python mailing list
[email protected]
http://lists.python.it/mailman/listinfo/python