I'm new here and hope you can help me with my problem.
I have a list in python with foldernames like:
List = ['file_io(0).txt','file_io(1).txt',....,'file_io(13004).txt']
and I would like to sort these files by ascending numbers in the brackets.
If I use sort(List)
, the files are sorted this way:
List = ['file_io(0).txt','file_io(1).txt','file_io(10).txt','file_io(100).txt',...]
Does anyone have an advice or a solution for me?
Thanks.