79356436

Date: 2025-01-14 21:38:49
Score: 1
Natty:
Report link
versions_list = ["1.1.2", "1.0.0", "1.3.3", "1.0.12", "1.0.2"]

# Sort using `key` where each version string is split into a tuple of integers

versions_list.sort(key=lambda version: tuple(map(int, version.split('.'))))

print(versions_list)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: lkc