human
Doubly Linked List | Set 1 ( Introduction and Insertion ) | Given a node as prev_node , insert a new node after the given node.
1. check if the given prev_node is NULL.
2. allocate node & 3. put in the data.
4. Make next of new node as next of prev_node.
5. Make the next of prev_node as new_node.
6. Make prev_node as previous of new_node.
7. Change previous of new_node 's next node"
How can the above be solved in Python?

=====
Write me a code to doubly Linked List and the other steps required?
assistant
#Here is code to doubly Linked List and the other steps required.
 def insertAfter ( self , prev_node , new_data ) :
	if prev_node is None :
		print ( " This ▁ node ▁ doesn ' t ▁ exist ▁ in ▁ DLL " )
		return
	new_node = Node ( data = new_data )
	new_node . next = prev_node . next
	prev_node . next = new_node
	new_node . prev = prev_node
	if new_node . next is not None :
		new_node . next . prev = new_node