Split string by spaces, remove empty strings. Example: " hello world " => ["hello","world"]
Implement this function:
def string_to_list_of_words(s: str) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: s.
Input
' hello world '
Output
['hello', 'world']