import re
def magic(value):
parts = re.split(r'(\d+)', value)
return [int(part) if part.isdigit() else part for part in parts]
a = [
['c2sp1s5', 0],
['c2sp1s10', 1],
['c2sp1s11', 0],
['c2sp1s1', 0]
]
print( sorted(a, key=lambda v: magic(v[0])) )
aW1wb3J0IHJlCgoKZGVmIG1hZ2ljKHZhbHVlKToKICAgIHBhcnRzID0gcmUuc3BsaXQocicoXGQrKScsIHZhbHVlKQogICAgcmV0dXJuIFtpbnQocGFydCkgaWYgcGFydC5pc2RpZ2l0KCkgZWxzZSBwYXJ0IGZvciBwYXJ0IGluIHBhcnRzXQogICAgCgphID0gWwogICAgWydjMnNwMXM1JywgMF0sCiAgICBbJ2Myc3AxczEwJywgMV0sCiAgICBbJ2Myc3AxczExJywgMF0sCiAgICBbJ2Myc3AxczEnLCAwXQpdCgpwcmludCggc29ydGVkKGEsIGtleT1sYW1iZGEgdjogbWFnaWModlswXSkpICk=