print(int('1011', 2)) # convert from binary to decimal int print(int('341', 8)) # convert from octal to decimal int print(int('21', 16)) # convert from hex to decimal ...
The typing spec currently says this: Python’s numeric types complex, float and int are not subtypes of each other, but to support common use cases, the type system contains a straightforward shortcut: ...