the info part of the header node is always None. therefor we can use this part to store some useful information about the linked list. like storing the number of nodes in a list and some of the value of linked list etc.

and the linked part of the header node is always referred to as the first node of the linked list. If the list is empty then always the header node is available in the linked list. so we don't need to check whether the linked list is empty or not. we can easily perform operations like insertion and deletion because we don't need to check if the list is empty or not.

```class Node(object):

def __init__(self,value):
self.info = value

def __init__(self):

def display_list(self):
print("List is empty")
return
print("List is : ")
while p is not None:
print(p.info, " ",end='')
print()

def create_list(self):
n = int(input("Enter the number of nodes : "))
for i in range(n):
data = int(input("Enter the element to be inserted : "))
self.insert_at_end(data)

def insert_at_end(self,data):
temp = Node(data)

def insert_before(self,data,x):

print(x, " not present in the list")
else:
temp = Node(data)

def insert_at_position(self,data,x):
i = 1        while i <= k-1 and p is not None:
i += 1
if p is None:
print("You can insert only upto ", (i-1), " th position")
else:
temp = Node(data)

def delete_node(self,data):

else:

def reverse_list(self):
while p is not None:
prev = p
p = next

list.create_list()

while True:
print("1. Display list")
print("2. Insert a node at the end of the list")
print("3. Insert a node before a specified node")
print("4. Insert a node at a given position")
print("5. Delete a node")
print("6. Reverse the list")
print("9. Quit")

option = int(input("Enter your choice : "))

if option == 1:
list.display_list()
elif option == 2:
data = int(input("Enter the element to be inserted : "))
list.insert_at_end(data)
elif option == 3:
data = int(input("Enter the element to be inserted : "))
x = int(input("Enter the element before which to insert : "))
list.insert_before(data,x)
elif option == 4:
data = int(input("Enter the element to be inserted : "))
k = int(input("Enter the position at which to insert : "))
list.insert_at_position(data,x)
elif option == 5:
data = int(input("Enter the element to be deleted : "))
list.delete_node(data)
elif option == 7:
break    else:
print("Wrong option")
print()```