list search the search algorithm is similar to that of the search method in singly linked list we call the internal method iter(to return the data in all the nodes as we loop through the dataeach is matched against the data passed into the contain method if there is matchwe return trueor else we return false to symbolize that no match was founddef contain(selfdata)for node_data in self iter()if data =node_datareturn true return false our doubly linked list has ( for the append operation and (nfor the delete operation circular lists circular list is special case of linked list it is list where the endpoints are connected that isthe last node in the list points back to the first node circular lists can be based on both singly and doubly linked lists in the case of doubly linked circular listthe first node also needs to point to the last node here we are going to look at an implementation of singly linked circular list it should be straightforward to implement doubly linked circular listonce you have grasped the basic concepts we can reuse the node class that we created in the section on singly linked lists as matter of factwe can reuse most parts of the singlylinkedlist class as well so we are going to focus on the methods where the circular list implementation differs from the normal singly linked list appending elements when we append an element to the circular listwe need to make sure that the new node points back to the tail node this is demonstrated in the following code there is one extra line as compared to the singly linked list implementationdef append(selfdata)node node(dataif self head