Introduction: evaluator We're making a web interface to an evaluation script. Trivial example: Suppose we start with a list like this... >>> letters = ['C', 'e', 'd', 'A', 'B', 'c', 'D', 'E', 'b', 'a'] And we want to end up with two lists: >>> good = ['C', 'A', 'B', 'D', 'E'] >>> bad = ['e', 'd', 'c', 'b', 'a'] (For some reason we want the uppercase letters, not the lowercase.) We iterate through the list, and classify them. >>> def isgood(letter): ... from string import ascii_uppercase ... return letter in ascii_uppercase >>> for item in letters: ... if isgood(item): good.append(item) ... else: bad.append(item) isgood() will be actually be done by the human user of the interface. >>> import evaluator