def getClass(obj):
 if hasattr(obj, '__class__'):
  return obj.__class__
 else:
  return type(obj)

def getClass ( obj ) : if hasattr ( obj , '__class__' ) : return obj . __class__ else : return type ( obj )
return the class or type of object obj .