table attributes for user-defined function 'fattributes description __doc__ documentation string __name__ function name __dict__ dictionary containing function attributes __code__ byte-compiled code __defaults__ tuple containing default arguments __globals__ dictionary defining the global namespace __closure__ tuple containing data related to nested scope some of the operations of table are shown belowdef mathex(ab)""calculate ( + )* ""global ( bx return mathex( mathex __doc__ calculate ( + )* mathex __globals__ {'__loader__''__builtins__''__spec__'none'__package__'none'__name__''__main__'' ' 'mathex''__doc__'none methods methods are the functions that are defined inside the class there are three types of methods instance methodclass method and static method following is an example of all three methodsclass spam()num class variable def __init__(selfnum )self num num def imethod(self)print instance variable print("imethod "self num@classmethod def cmethod(cls)print class variable print("cmethod "cls num@staticmethod def smethod(num)print variable defined in the file print("smethod "nums spam( imethod((continues on next page builtin types for representing program structure