✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is the output of the following code snippet?
class Node:
def __init__(self, data):
self.data = data
self.next = None
head = Node(10)
head.next = Node(20)
head.next.next = Node(30)
curr = head
while curr.next:
curr = curr.next
print(curr.data)