Yes, JOM is right, again ...
Thanks to foreseen the mistake.
But I think both approach have problems, in different situations:
But, I know, if we want just to check 1.x against 2.y, a simple string comparison is enough, as indicated by JOM. This seemed a simple question ...
In my code (wordmobi), I defined versions like x.y.z, I mean, 3 numbers separated by ".". Each number with one or two digits. And I used this function:
An integer is returned but it costs a lot to process ...
a,b,c = map(lambda x,y: x*y, [10000,100,1],[int(v) for v in ver.split(".")])