79669053

Date: 2025-06-17 12:27:14
Score: 2
Natty:
Report link

If your data has numbers stored as strings, Python will sort 10 before 2 because it's comparing character-by-character. If you want numeric sorting, convert them to integers in the key:

sorted_data = sorted(mix_data, key=lambda x: (int(x[0]), int(x[1])))

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kajal Kapoor