1
$\begingroup$

How would I be able to convert a single string to a string of data? An example would be converting:

data= AMD AAPL FB SNAP MSFT 

into the format:

{"AMD","AAPL","FB","SNAP","MSFT"}

Thanks!

$\endgroup$
2
$\begingroup$
data = "AMD AAPL FB SNAP MSFT";

StringSplit[data]

{"AMD", "AAPL", "FB", "SNAP", "MSFT"}

$\endgroup$
  • $\begingroup$ thanks again eldo! Also realized to add InputForm to add the "" between each string. Thanks a lot :) $\endgroup$ – jeff Aug 7 '17 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.