1 双向链表
双向链表的python代码实现
class Node(): def __init__(self,item): self.item = item self.node = None class Link(): def __init__(self): self._head = None def add(self,item): # 实例化None node = Node(item) node.next = self._head # node Node类对象的地址 self._head = node link = Link() link.add(1) link.add(2)