May I know why must Line 10 and 11 be at the end of the for loop and not part of the if else for count > 2
def checkio(words: str) -> bool:
newWord = words.split()
count = 0
for x in newWord:
if x.isalpha():
count += 1
else:
count = 0
if count > 2:
return True
else:
return False
Created at: 2019/10/21 03:20; Updated at: 2019/10/21 07:35