fork download
  1. a = ['285/30/18',
  2. '285/30/19',
  3. '235/40/17',
  4. '315/25/19',
  5. '275/30/19']
  6. print sorted(a, key=lambda x:x[-2:] + x[4:6] + x[:3])
Success #stdin #stdout 0.08s 10864KB
stdin
Standard input is empty
stdout
['235/40/17', '285/30/18', '315/25/19', '275/30/19', '285/30/19']