Skip to Content
Nodes: Python
Nodes Python Setter

We are only allowing the value of the node to be set upon creation. However, we want to allow updating the link of the node. For this, we will use a setter to modify the self.link_node attribute.

The method should be called .set_link_node() and should take link_node as an argument. It should then update the self.link_node attribute as appropriate.



Implement the .set_link_node() setter in the Node class.

Folder Icon

Sign up to start coding

Already have an account?