def push(self, k):
if not self._first:<EOL><INDENT>self._first = self._last = node = DLL.Node(k)<EOL><DEDENT>elif self._first.value == k:<EOL><INDENT>return<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>self.delete(k) <EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>self._first = node = self._first.insert_before(k)<EOL><DEDENT>self._index[k] = node<EOL>self._size += <NUM_LIT:1><EOL>
Push k to the top of the list

        >>> l = DLL()
        >>> l.push(1)
        >>> l
        [1]
        >>> l.push(2)
        >>> l
        [2, 1]
        >>> l.push(3)
        >>> l
        [3, 2, 1]