Blog

python tutorials and learn python

Created with Sketch.

Python program to insert a new node at the middle of the Doubly Linked List.

Python program to insert a new node at the middle of the Doubly Linked List. In this program, we create a doubly linked list and insert a new node in the middle of the list. If the list is empty, both head and tail will point to the new node. If the list is not…
Read more

Python program to insert a new node at the end of the Doubly Linked List.

Python program to insert a new node at the end of the Doubly Linked List. In this program, we will create a doubly linked list and insert every new node at the end of the list. If the list is empty, then head and tail will point to the newly added node. If the list…
Read more

Python program to insert a new node at the beginning of the Doubly Linked list.

Python program to insert a new node at the beginning of the Doubly Linked list. In this program, we will create a doubly linked list and insert every new node at the beginning of the list. If the list is empty, then head and tail will point to the newly added node. If the list…
Read more

Python program to find the maximum and minimum value node from a doubly linked list.

Python program to find the maximum and minimum value node from a doubly linked list. In this program, we will create a doubly linked list then, iterate through the list to find out the minimum and maximum node. We will maintain two variables min and max. Min will hold the minimum value node, and max…
Read more

Python program to delete a new node from the middle of the doubly linked list.

Python program to delete a new node from the middle of the doubly linked list. In this program, we will create a doubly linked list and delete a node from the middle of the list. If the list is empty, display the message “List is empty”. If the list is not empty, we will calculate…
Read more

Python program to delete a new node from the end of the doubly linked list.

Python program to delete a new node from the end of the doubly linked list. In this program, we will create a doubly linked list and delete a node from the end of the list. If the list is empty, print the message “List is empty”. If the list is not empty, the tail’s previous…
Read more

Python program to delete a new node from the beginning of the doubly linked list.

Python program to delete a new node from the beginning of the doubly linked list. In this program, we will create a doubly linked list and delete a node from the beginning of the list. If the list is empty, print the message “List is empty”. If the list is not empty, we will make…
Read more

Python program to create and display a doubly linked list.

Python program to create and display a doubly linked list. In this program, we will create a doubly linked list and print all the nodes present in the list. Doubly Linked List: Doubly Linked List is a variation of the linked list. The linked list is a linear data structure which can be described as…
Read more

Python program to create a doubly linked list of n nodes and display it in reverse order.

Python program to create a doubly linked list of n nodes and display it in reverse order. In this program, we create a doubly linked list and then reverse the list by reversing the direction of the list and print out the nodes. Traverse through the list by swapping the previous pointer with next pointer…
Read more

Python program to create a doubly linked list of n nodes and count the number of nodes.

Python program to create a doubly linked list of n nodes and count the number of nodes. In this program, we will create a doubly linked list and count the number of nodes present in the list. To count the node, we traverse through the list by incrementing the counter by 1. What count of…
Read more