>>> '1.2.3'>'1.1.5'
True
>>> '1.1.3'>'1.1.5'
False
>>> '1.1.5'>'1.1.5'
False
>>> '1.1.7'>'1.1.5'
True
>>> '1.1.9'>'1.1.5'
True
>>> '1.1.10'>'1.1.5'
False
>>> '1.2'>'1.1.5'
True
>>> '1.2.9'>'1.1.5'
True
>>> '1.2.10'>'1.1.5'
True
Hi,
I am trying to compare two strings as shown above. First of all, I am surprised that python comparing strings of numbers. firstly I thought that it will just compare lengths, but for different values it's giving exact values and I am astonished. But, for '1.1.10' > '1.1.5' it's false... i don't know why.... can anyone help...