第42257题 单选题
对如下定义的循环单链表,横线处填写( )。
class Node:
    def __init__(self, data):
        self.data = data
        self.next = None

def create_list(value):
    head = Node(value)
    head.next = head
    return head

def insert_tail(head, value):
    p = head
    while p.next != head:
        p = p.next
    node = Node(value)
    node.next = head
    p.next = node

def print_list(head):
    _______________________________
    while True:
        print(p.data, end=" ")
        p = p.next
        if p == head:
            break
    print()
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析