On Wednesday, 17. June 2009, Steven D'Aprano wrote: > while text: > for c in text: > if c not in printable: return False
that is one loop per character. wouldn't it be faster to apply a regex to text? something like while text: if re.search(r'\W',text): return False -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list