Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Easy solution #2 solution in Clear category for Three Words by Cec-Krem
def checkio(words: str) -> bool:
count=0
for i in words.split():
if not i.isdigit():
count+=1
else:
count=0
if count == 3:
return True
return False
print("Example:")
print(checkio("Hello World hello"))
# These "asserts" are used for self-checking
assert checkio("Hello World hello") == True
assert checkio("He is 123 man") == False
assert checkio("1 2 3 4") == False
assert checkio("bla bla bla bla") == True
assert checkio("Hi") == False
print("The mission is done! Click 'Check Solution' to earn rewards!")
Nov. 23, 2023