Version strings look like text but behave like numbers. 1.10.0 is newer than 1.9.2, 2.0 equals 2.0.0, and 1.0.0rc1 comes before 1.0.0. Release scripts, dependency checks and upgrade tools all go wrong when they compare versions as plain strings.
Semantic versioning gives the three numbers a meaning. A patch release fixes bugs, a minor release adds features without breaking callers, and a major release may break them. Ranges such as >=2.31,<3 or ~=1.4.2 use that meaning to accept safe upgrades and refuse risky ones.
In this lesson you sort versions, bump them, test whether a version satisfies a range and place pre-releases correctly. Turning each version into a tuple of integers does most of the work, because Python compares tuples item by item.
Out: (['1.10.0', '1.9.2'], ['1.9.2', '1.10.0']). Text order and version order disagree.