Python property() class

The property() class in Python returns a property attribute.

Syntax

Parameter

fget: This attribute is used for getting an attribute value.

fset : This parameter sets an attribute value.

fdel: It is a function for deleting an attribute value.

doc: This parameter creates a docstring for the attribute.

Return

This class returns a property attribute.

Example 1

Output

Pin It on Pinterest

Share This