Aries Sun <[EMAIL PROTECTED]> wrote: >I used Python 2.4.1, the following are the command lines. >But the reslut was still False. Is there anything wrong with below >codes? >>>> import itertools as it >>>> def hasConsequent(aString, minConsequent): > for _,group in it.groupby(aString): > if len(list(group)) >= minConsequent: > return True > return False
Yes: return False is at the wrong indentation level. -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins one way or the other" \X/ | -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list