Create a Python class that implements the methods of a list structure.
Implement the following methods.
insert
set a value as the start of the list before other nodesinsert_after
insert a node with value after the first node containing keyinsert_before
insert a node with value before the first node containing keyappend
set a value as a node at the end of the listremove
taking a key and removing the first node that contains the keykth_from_end
taking an integer index and returning the node k from end of listhas_loop
without arguments return if there is a loop in list links
Implement the following functions.
merge_lists
zip two lists together and return the new head
Whiteboard Images