Esempio n. 1
0
 def push(self, _item: int) -> None:
     """
     Push _item to head
     :param _item:
     :return None:
     """
     x = self._head is not None
     new_node = Node(_item)
     new_node._next = self._head
     self._head = new_node
     try:
         self._head._next._prev = self._head
     except AttributeError:
         pass