• Three Words: 'one two 3...' Test Failing

Question related to mission Three Words


This is my code:

def checkio(words):
run = 0

for i in words.split(' '):

    for j in i:
        if j.isalpha():

            run = 0

    run += 1
    if run == 3:
        return True

return False

It is failing on the following:

assert checkio('one two 3 four five 6 seven eight 9 ten eleven 12') == False ... Fail

Why is my code turning up true when this should be false? What am I missing?