IMO the regex is not too bad; I will not use it for this job -- typing a 50+ character string is more painful (and more error prone) than writing 5--10 lines of code.
That said, if it made you look at regexes deeply and beyond the simple explanation of what each character (*, ., +) does I think the teacher ended up making you learn something. FInally, the simplest NON-REGEX method is probably isAlphaOrder(s): return sorted(s) == list(s) It is useful learning to add default parameters to this to improve the functionality to case-dependent or case independent modes. Happy learning Asokan Pichai _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor