Hard
Comparing Objects
Write a
Version class from a string like 1.10.2 with __lt__ and __eq__ comparing numerically. Read versions until END and print them sorted, then the newest.Input
Versions, then END.
Output
Sorted line, then newest.
Sample 1
Input
1.10.2 1.2.10 1.2.9 END
Output
1.2.9 1.2.10 1.10.2 1.10.2
Sample 2
Input
3.0 END
Output
3.0 3.0
Output appears here