Hello, I am trying to create a program that automatically converts a string into a list in a certain way. I stumbled upon the split()By() block, but I need something a little more powerful. I am not sure about the best way to go about this, whether this be by chaining multiple split()By() blocks or by using the map()Over() block or even something else. What I want is the following:
Convert the string “The quick’s brown fox, jumps over the (very) lazy dog.”:
To a list where each word and character are separate items, and all spaces are eliminated ([“The”, “quick”, ”’”, ”s”, ”brown”, ”fox”, ”,”, ”jumps”, ”over”, ”the”, ”(“, ”very”, “)”, “lazy”, “dog”, “.”]):
I think I will first use split(story)By(word):
To get this:
But I am not sure how to get any farther. Any ideas would be greatly appreciated!
So, since SPLIT absorbs its delimiter character, I decided to help it by putting my own delimiter, a character not used in your application, for which I chose backslash (\) but you can choose anything, so I can split by \ instead of by each specific delimiter you have in mind: