How do I replace the commas on the second level of a list with replacement arrows?
For example, this:
{{a, girl}, {b, girl}, {c, girl}, {e, girl}, {g, girl}}
To this:
{{a->girl}, {b->girl}, {c->girl}, {e->girl}, {g->girl}}
Replace
doesn't work because it thinks the comma shouldn't be there. Putting it in quotes doesn't work, nor does StringReplace
What I think it should be:
Replace[list, "," -> "->", {2}]