Learn
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.
Instructions
1.
Implement the .set_link_node()
setter in the Node
class.
Sign up to start coding
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.