For splitting the string on whitespace in Python you can use the str.split() function without any argument it will split strings on whitespace below is an example that shows how to use str.split():-
>>>"Hello programmers enjoy the programming world".split()
There is another method which uses a regular expression to splits the strings on to whitespace below is the code that illustrates how we do it:-
import re
s = "Hello programmers enjoy the programming world"
re.split('\s+', s)