Say you have the following list of 12 elements
X={"x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x"}
And I want to turn it into the following sorted list:
{"x1", "x10", "x11", "x12", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"}
How do I achieve this? I've tried numerous methods such as using a "Print[]" within a For loop and StringReplace but I haven't figured it out. I'm new to mathematica. Thanks in advance for the help!
Sort@Table["x" <> IntegerString[i], {i, 1, 12}]
$\endgroup$