• Bug, asserts are passed but result is fail

Question related to mission Three Words

  I would like to give some feedback about ...

From: http://www.checkio.org/mission/three-words/solve/

HTTP\_USER\_AGENT:

    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

My Code:

    def checkio(words):
        print ('*' * 50)
        l = words.split()
        count = 0
        for i in l:
            if not i.isdigit():
                
                count += 1
                #print (count)
            else:
                count = 0
        #print (count)
    
        if count >= 3:
            print (words, 'TRUE')
            return True
        else:
            print (words, 'FALSE')
            return False
        
    
    #These "asserts" using only for self-checking and not necessary for auto-testing
    if __name__ == '__main__':
        assert checkio("Hello World hello") == True, "Hello"
        assert checkio("He is 123 man") == False, "123 man"
        assert checkio("1 2 3 4") == False, "Digits"
        assert checkio("bla bla bla bla") == True, "Bla Bla"
        assert checkio("Hi") == False, "Hi"