Language - Object in Python.
In Python everything is an object including:
- and functions
Comparing objects of different types is legal.
The outcome is deterministic but arbitrary: the types are ordered by their name. Thus, a list is always smaller than a string, a string is always smaller than a tuple, etc. Mixed numeric types are compared according to their numeric value, so 0 equals 0.0, etc.
The rules for comparing objects of different types should not be relied upon; they may change in a future version of the language.
vars([object]) -> dictionary
type of an object