Computer Science, asked by abuzarsiddique8271, 11 months ago

How to convert a string to a list of words in python?

Answers

Answered by kaushikpriya0304
1

Answer:

Explanation:

def Convert(string):                        #Function to convert string to list

   lst = list(string.split(" "))

   return lst

 

# Driver code or main function code

str1 = "Geeks for Geeks"

print(Convert(str1))

Similar questions