单链表插入元素出错,疑问
class Node(object):def __init__(self, data, next=None):
self.data = data
self.next = next
...
----------------------------------------
n1 = Node
n2 = Node('A', None)
n3 = Node('B', n2)
---------------------------------------------
当我们调用n1.next = n3,为什么会出现AttributeError?? are u kidding me??
页:
[1]