Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Three Words by Pavellver
def checkio(words: str) -> bool:
new_array = words.split()
counter = 0
for word in range(0, len(new_array)):
if new_array[word].isalpha():
counter += 1
if counter == 3:
return True
else:
counter = 0
return False
print("Example:")
print(checkio("Hello World hello"))
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!")
Jan. 15, 2023
Comments: