I have a list of strings which represent tuples, like so:
['(q2,0)', '(q3,0)', '(q0,0)', '(q1,0)', '(q4,0)']
Is there any way to sort it by accessing the numbers after each q, so that the list looks like this:
[ '(q0,0)', '(q1,0)', '(q2,0)', '(q3,0)', '(q4,0)']
It would be easy if these were integers, however I need to keep the string format as they are now...