On Sat, 12 Mar 2005 17:06:17 -0800,
'@'.join([..join(['fred','dixon']),..join(['gmail','com'])]) wrote:
I'd also suggest
validInput = "ABCDEFGHIJKL" # and there are more clever ways to do this,
# but this will do
myInput = raw_input(" ".join(validInput) + "?")
if len(myInput) != 1:
# do whatever
pass
if myInput not in validInput:
raise ValueError("Input not in legal input: " + validInput)
Obviously not a drop-in replacement for your code, but ought to clean it
up a little.
--
http://mail.python.org/mailman/listinfo/python-list