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$

1 Answer 1

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

StringSplit[data]

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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