Sortir daftar di Python dengan substring
mylist = ['XYZ-78.txt', 'XYZ-8.txt', 'XYZ-18.txt']
print(sorted(mylist, key=lambda x: int(x.split("-")[-1].split(".")[0])))
Combative Cat