The setattr() function assigns the specified value argument to the specified attribute name (existing or new) of the specified object. This is the counterpart of getattr() method. The setattr() method is equivalent to object.
The setattr() function assigns the specified value argument to the specified attribute name (existing or new) of the specified object. This is the counterpart of getattr() method. The setattr() method is equivalent to object.