Light Mode
Dark Mode
'four five six' are words

Here is my code:

def checkio(words: str) -> bool:
    array = words.split(' ')
    if len(array) < 3:  
        return False
    while True:
        for i in array[0:3]:
            if not i.isalpha():
                return False
        del array[0]
        return True

But here is the problem showed after checking:

assert checkio('one two 3 four five six 7 eight 9 ten eleven 12') == True ...
Fail

Why Fail? What's wrong?

Created: Sept. 23, 2022, 8:18 p.m.
Updated: Sept. 23, 2022, 10:53 p.m.
0
5
User avatar
CraZZy_RAVEN