We have a few zany characters to keep track of and Python nodes may do just the trick. Let’s get started…
Node, instantiate three nodes. None have an argument for
"likes to yak"and be assigned to a variable
"has a penchant for hoarding snacks"and be assigned to
"enjoys spending time in movie lots"and be assigned to
Now let’s give these nodes some responsibilities!
yacko can keep track of
dot can keep up with
wacko can’t keep track of anything though.
Below the newly created nodes, use your
.set_link_node() method to give:
Create two new variables,
wackos_data. Use both getter methods to get
dot‘s value from
yacko and get
wacko‘s value from
wackos_data to the console to see the results!
When your code is passing, take a moment to consider: