UPDATE: I should have specified this sooner, but not all of the names are simply floats. For example, some of them are \"prefixed\" with \"YT\". So for example\" YT1.1. so,
This is not a built-in method, but it ought to work:
>>> def lt(num1, num2):
... for a, b in zip(num1.split('.'), num2.split('.')):
... if int(a) < int(b):
... return True
... if int(a) > int(b):
... return False
... return False
...
... lt('4.2', '4.11')
0: True
That can be cleaned up, but it gives you the gist.