Aahz wrote:

Much simpler and *way* more efficient with a set:

if len(set(s)) < N:
    print "Must have at least %s different characters" % N

Or you could do a dictionary lookup on the words.
I can just see the error message:

  "Your comment must include at least one verb,
  one noun, one non-cliched adjective and one
  Monty Python reference."

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to