title: Keeping track of what needs to be removed in a linked list
body: <p>I'm using a while loop to loop through a linked list of nodes, with each node having a value that is a stack. If the top value of the stack is the same for 3 nodes in a row, then the top value needs to be removed, and points need to be scored. How would I go about keeping track of which stacks need to have their top value removed? What I have so far (will score the points but I don't know how to keep track of which nodes need to be removed) In addition, I  am NOT allowed to use any sort of python lists at all. In case I wasn't clear, if there are 3 in a row, they are removed and points are scored, similar to bejeweled. Each node has a stack as its value. </p>
  
  <pre><code>        cur_node = self._front
          previous = cur_node.get_value().peek() 
          cur_node = cur_node.next
          in_a_row = False
          points_gained = 0
          count = 0 
  
          while cur_node:
              current = cur_node.get_value().peek()
              if current == previous:
                  count = count + 1
              else:
                  if in_a_row:
                      points_gained = points_gained + (count ** 2)
                      in_a_row = False
                  count = 1
  
              if count &gt;= 3:
                  in_a_row = True
  </code></pre>