There's a python list where I stored the filenames from multiple subfolders.
Here's a snapshot of the list
I tried to sort this list by using such a line
mylist = list_files(MAIN_DIR)
print(sorted(mylist, key=lambda x: int(x.split('/')[-1][:-4].replace('_',''))))
But this doesn't work and thows an error ValueError: invalid literal for int() with base 10
What I need is to sort the list by the filename (the base name) as shown in the snapshot