Sorting software version list using Python 2.7 (no modules)
The best way would be to use the distutils.StrictVersion as your sort key argument.

However, as you do not want to use imports, you may choose to copy the _cmp, __eq__, __le__ and other comparison methods as applicable, from the source file linked above. You'd also modify the parse method to use str.split instead of a regex matching.

I do not think you'd have to worry about pre-releases etc.



Why I'd go with distutils is because it has been tested since a long time. Writing your own version would be prone to errors, and edge cases.