String Join but not fully
up vote
3
down vote
favorite
Suppose I have the following string list:
l={{"a","dog"},{"the","pen"}}
how can I turn this to
{{"a dog"},{"the pen"}}
I tried StringJoin
yet that gives
{{"adog"},{"thepen"}}
list-manipulation string-manipulation
add a comment |
up vote
3
down vote
favorite
Suppose I have the following string list:
l={{"a","dog"},{"the","pen"}}
how can I turn this to
{{"a dog"},{"the pen"}}
I tried StringJoin
yet that gives
{{"adog"},{"thepen"}}
list-manipulation string-manipulation
Look atStringRiffle
.
– Jason B.
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
even if I do{l // StringRiffle}
I get{"a dognthe pen"}
– William
10 hours ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Suppose I have the following string list:
l={{"a","dog"},{"the","pen"}}
how can I turn this to
{{"a dog"},{"the pen"}}
I tried StringJoin
yet that gives
{{"adog"},{"thepen"}}
list-manipulation string-manipulation
Suppose I have the following string list:
l={{"a","dog"},{"the","pen"}}
how can I turn this to
{{"a dog"},{"the pen"}}
I tried StringJoin
yet that gives
{{"adog"},{"thepen"}}
list-manipulation string-manipulation
list-manipulation string-manipulation
asked 10 hours ago
William
61638
61638
Look atStringRiffle
.
– Jason B.
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
even if I do{l // StringRiffle}
I get{"a dognthe pen"}
– William
10 hours ago
add a comment |
Look atStringRiffle
.
– Jason B.
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
even if I do{l // StringRiffle}
I get{"a dognthe pen"}
– William
10 hours ago
Look at
StringRiffle
.– Jason B.
10 hours ago
Look at
StringRiffle
.– Jason B.
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
even if I do
{l // StringRiffle}
I get {"a dognthe pen"}
– William
10 hours ago
even if I do
{l // StringRiffle}
I get {"a dognthe pen"}
– William
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
List /@ StringRiffle /@ l
{{"a dog"}, {"the pen"}}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
List /@ StringRiffle /@ l
{{"a dog"}, {"the pen"}}
add a comment |
up vote
3
down vote
accepted
List /@ StringRiffle /@ l
{{"a dog"}, {"the pen"}}
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
List /@ StringRiffle /@ l
{{"a dog"}, {"the pen"}}
List /@ StringRiffle /@ l
{{"a dog"}, {"the pen"}}
answered 10 hours ago
kglr
173k8196401
173k8196401
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f186986%2fstring-join-but-not-fully%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Look at
StringRiffle
.– Jason B.
10 hours ago
@JasonB. I have but that does not a list format.
– William
10 hours ago
even if I do
{l // StringRiffle}
I get{"a dognthe pen"}
– William
10 hours ago