how to check the name of a class in python code example Example 1: python get type class name type(x).__name__ Example 2: python class name instance.__class__.__name__