I am trying to solve a problem where I need to get every word in the sentence and sort it alphabetically. I would really appreciate some help in the matter, as I don't quite have a clue about how to get every word separately inside a list so i could sort it. Thanks for your time! I have tried using a for loop to search for every space but it didn't seem to work out as I didn't have quite enough of an idea how to get the word itself out.
if action = "sort"
for word in text:
if word == " ":
pass