1. 首页
  2. 数据库
  3. 其它
  4. python操作链表的示例代码

python操作链表的示例代码

上传者: 2020-12-23 01:11:19上传 PDF文件 32.18KB 热度 18次
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=
下载地址
用户评论