> > >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
Mi piace. Molto elegante e compatto. Grazie Walter _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python