 <pre><code>if __name__ == "__main__": MLL = LinkedList() LL1 = LinkedList() LL2 = LinkedList() array_list1 = [2, 4, 5, 7, 11, 12, 15, 20] array_list2 = [3, 6, 9, 10] for p in array_list1: LL1.addElement(p) for q in array_list2: LL2.addElement(q) cur_node_l1 = LL1.Head cur_node_l2 = LL2.Head cur_node = MLL.Head; while(cur_node_l1 and cur_node_l2): e1 = cur_node_l1.element e2 = cur_node_l2.element if e1 &lt; e2: if not cur_node: cur_node = cur_node_l1; MLL.Head = cur_node else: cur_node.Next = cur_node_l1; cur_node = cur_node_l1 cur_node_l1 = cur_node_l1.Next # MLL.TAIL = cur_node_l1; else: if not cur_node: cur_node = cur_node_l2; MLL.Head = cur_node else: cur_node.Next = cur_node_l2; cur_node = cur_node_l2; cur_node_l2 = cur_node_l2.Next # MLL.TAIL = cur_node_l2; if (cur_node_l1): cur_node.Next = cur_node_l1 cur_node = LL1.Tail; if (cur_node_l2): cur_node.Next = cur_node_l2 cur_node = LL2.Tail; MLL.Tail = cur_node MLL.size = LL1.size + LL2.size MLL.displayLinkedList() </code></pre>