#Linked List Python file for Efrain , Mark and Henry

class Node(object):
    """Calss DocString Here"""

    def __init__(self, value, pointer = None):
        self.pointer = pointer
        self.value = value

        return None





class Linked_list(object):
    """" """

    def __init__(self):
        self.head = None

    def insert(self, value):

        if self.head == None:
            self.head = Node(value)
        else:
            new_node = Node(value, self.head)
            self.head = new_node

        print self.head

    def __str__(self):
        output = ""
        currentposition = self.head
        while(currentposition):
            # ', '.join((output, str(currentposition.value)))
            output+= str(currentposition.value)
            currentposition = currentposition.pointer
        output = "({})".format(output)
        return output


@@ -1,8 +1,31 @@
+#! /usr/bin/env python%0A
 #Linked 
@@ -69,16 +69,16 @@
 d Henry%0A
-
 %0Aclass N
@@ -651,17 +651,17 @@
    while
-(
+ 
 currentp
@@ -667,17 +667,16 @@
 position
-)
 :%0A      
@@ -872,16 +872,16 @@
 output)%0A
-
         
@@ -895,8 +895,1518 @@
 output%0A%0A
+    def pop(self):%0A        old_head_value = self.head.value%0A        self.head = self.head.pointer%0A        return old_head_value%0A%0A%0A    def size(self):%0A        count = 0%0A        currentposition = self.head%0A        while currentposition:%0A            count += 1%0A            currentposition = currentposition.pointer%0A        return count%0A%0A%0A    def search(self, value):%0A        currentposition = self.head%0A        while currentposition:%0A            if currentposition.value == value:%0A                return currentposition%0A            currentposition = currentposition.pointer%0A        return None%0A%0A    def remove(self, node):%0A        currentposition = self.head%0A        previousposition = None%0A%0A        # for case when we are removing first node%0A        if currentposition == node:%0A            self.head = currentposition.pointer%0A            return None%0A%0A        while currentposition:%0A            if currentposition == node:%0A                previousposition.pointer = currentposition.pointer%0A            previousposition = currentposition%0A            currentposition = currentposition.pointer%0A%0Aif __name__ == %22__main__%22:%0A    a = Linked_list()%0A    a.insert(%22tree%22)%0A    a.insert(%22bee%22)%0A    a.insert(34)%0A    # print a.size()%0A    # print str(a)%0A    # print a.pop()%0A    # print str(a)%0A    # print a.size()%0A    # print a.search(%22tree%22)%0A    # print a.search(34)%0A    print str(a)%0A    a.remove(a.search(%22bee%22))%0A    print str(a)%0A    a.remove(a.search(34))%0A    print str(a)%0A    a.remove(a.search(%22tree%22))%0A    print str(a)%0A%0A%0A%0A%0A

Add pop, size, search and remove methods.