class Node: def __init__(self,dataval=None): self.dataval=dataval self.nextval=None class SLinkList: def __init__(self): self.headval=None # 遍历列表 def traversal_slist(self): head_node=self.headval while head_node is not None: print(head_node.dataval) head_node=