The following snippet is annotated with the output (as seen on ideone.com):
print \"100\" < \"2\" # True print \"5\" > \"9\" # False print
Strings are compared lexicographically, and dissimilar types are compared by the name of their type ("int" < "string"). 3.x fixes the second point by making them non-comparable.
"int"
"string"