Hi George, 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
>>> hasConsequent("taaypiqee88adbbba", 3)
False
>>>
Regards,
Aries
--
http://mail.python.org/mailman/listinfo/python-list
