顺着走一步碰到谁
两半
串起来
运行下面这段程序:
class Node:
def __init__(self, name):
self.name = name
self.next = None
def build(names):
head = None
for x in reversed(names):
nd = Node(x)
nd.next = head
head = nd
return head
head = build(["阿岚", "小满", "阿泰", "南风"])
print(head.next.name)
全部评论