Putting string values into array


#1

I have a string that contians about 20 names that are all seperated by a
single white space. What is the easiest way to get those 20 names into
an array of 20 elements?

a = “first_name second_name third_name etc”

thanks

jack


#2

Alle Friday 21 November 2008, jackster the jackle ha scritto:

I have a string that contians about 20 names that are all seperated by a
single white space. What is the easiest way to get those 20 names into
an array of 20 elements?

a = “first_name second_name third_name etc”

thanks

jack

a.split ’ ’

Stefano


#3

On Nov 21, 1:32 pm, Stefano C. removed_email_address@domain.invalid wrote:

jack

a.split ’ ’

actually just

a.split

is all you need.

– Mark.