Counting elements in a list wildcard

Edward Elliott nobody at 127.0.0.1
Wed Apr 26 13:30:54 EDT 2006


Iain King wrote:
> steven = re.compile("Ste(v|ph|f|ff)(e|a)n")
> steven = ["Steven", "Stephen", "Stefen", "Steffen", "Stevan",
> "Stephan", "Stefan", "Steffan"]
> 
> I know which I'd rather type.  'Course, if you can use a ready-built
> list of names...

Oh I agree, I'd rather *type* the former, but I'd rather *read* the
latter. :)



More information about the Python-list mailing list