I have a list with 240 figures all starting with the fig and the number of the fig.
Here is an example :
fig1-24-24-32
fig3-45-32-12
fig2-24-24-31
fig5-24-24-31
fig6-24-24-31
fig4-24-24-31
I would like to order that list by fig name:
fig1-24-24-32
fig2-24-24-31
fig3-45-32-12
fig4-24-24-31
fig5-24-24-31
fig6-24-24-31
I have tried :
print(glob.glob('fig*[1-241]*'))
However this does not work
This is what I get
UPDATE Found the answer to my question here: https://stackoverflow.com/a/2669120/6235069 Answer is given by @Mark Byers