class NodeList: """定义节点""" def __init__(self, val): self.val = val self.next = None class LinkList: """定义链表""" def __init__(self, head: NodeList) -> None: # 初始化链表 self.head = head def add_n...