May 2017
Intermediate to advanced
310 pages
8h 5m
English
Here is a simple node implementation of what we have discussed so far:
class Node: def __init__(self, data=None): self.data = data self.next = None
The next pointer is initialized to None, meaning that unless you change the value of next, the node is going to be an end-point. This is a good idea, so that we do not forget to terminate the list properly.
You can add other things to the node class as you see fit. Just make sure that you keep in mind the distinction between node and data. If your node is going to contain customer data, then create a Customer class and put all the data there.
One thing you may want to do is implement ...