Python delattr() function

The delattr() function in Python is used to delete the named attribute from the object, with the prior permission of the object.

Syntax

Parameter

object : This parameter represents the object from which the name attribute which is to be removed.

name :  This parameter represents the name attribute which is to be removed.

Return

The function doesn’t return any value, it just removes the attribute, only if the object allows it.

Example 1

Output

 

Pin It on Pinterest

Share This