I'm creating a Node
class that takes some parameters. One is called next
which I would like to be set as None
by the constructor if no value is supplied.
class Node(object):
def __init__(self, next,data):
self.data = data
self.next = next
def X(self):
node = Node(next ,data)
How can I do that?