Hi, @Roshni,
You can use Python <split()> function to break a string into substrings based on the defined separator. It returns the list of all words present in the input string. I will show you an example below:
list("I am learning Python.")
Output:
['I', ' ', 'a', 'm', ' ', 'l', 'e', 'a', 'r', 'n', 'i', 'n', 'g', ' ', 'P', 'y', 't', 'h', 'o', 'n', '.']