Строка в список: split()

Метод split() делит строку по пробелам:

words = "Fast API and Flask".split()
print(len(words))  # 4