How to convert a string to a list of words in python?
Answers
Answered by
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