-2

i have an simple question. It is possible to make some function, that will division my string to several other strings? It will works like that:

if string has whitespaces count spaces, make as many string as whitespaces count and division it by spaces? Like: "some string 123" string1 = "some", string2 = "string", string3 = "123"

Can someone helps me with it? Im a little bit new in this case :/

poooE
  • 1
  • 5

1 Answers1

0

Try:

 "some string 123".split(" ")
tendai
  • 1,172
  • 1
  • 11
  • 22