Python has a strong set of introspection features.
Take a look at the following built-in functions:
type()dir()id()getattr()hasattr()globals()locals()callable()
type() and dir() are particularly useful for inspecting the type of an object and its set of attributes, respectively.