def __init__(self)self headval none function to add node def inbetween(self,middle_node,newdata)if middle_node is noneprint("the mentioned node is absent"return newnode node(newdatanewnode nextval middle_node nextval middle_node nextval newnode print the linked list def listprint(self)printval self headval while printval is not noneprint (printval datavalprintval printval nextval list slinkedlist(list headval node("mon" node("tue" node("thu"list headval nextval nextval list inbetween(list headval nextval,"fri"list listprint(when the above code is executedit produces the following resultmon tue fri