So, Here the basic code through which you can create a structure for a node in a Singly linked list using python.
Class Node: def __init__(self,data): self.data = data self.next = None
In this code, we have used constructor(__init__) to automatically assign the value of pass data value to data pointer and the pointing out next pointer to none.
new_node = Node(4)
It means that new_node.data will be equal to 4 and new_node.next will be equal to None.