class Node: # Constructor to initialize the node object def __init__(self, data): self.data = data self.next = None class LinkedList: # Function to initialize head def __init__(self): self.head = None # Function to insert a new node at the beginning def push(self, new_data): new_node = Node(new_data) new_node.next = self.head self.head = new_node


이런 코드에서 new_node를 뭐라고 부름?

내가 궁금한게 이렇게 linked list 만들어서

llist = LinkedList() llist.push(7) llist.push(1) llist.push(3) llist.push(2)

이렇게 쓰던데 결국 new_node라는 새로운 instance 만들잖아 근데 instance 이름이 계속 new_node로 같아도 됨?

중복되면 구분이 안되잖아