To break a string with spaces, use .split(" ");
You split the string into anything just by passing a separator (i.e. a separator) as an argument split().
:
"hello world".split(' ') ["hello", "world"]
"google.com".split('.') ["google", "com"]
"415-283-8927".split('-') ["415", "283", "8927"]
Bonus:
, :
"helloworld".split('') ['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'] ( , )
, (.split()), , .