print linked list python code example
Example 1: print a linked list in python
node = linked_list.head
while node:
print node.value
node = node.next
Example 2: print all objects linked list python
def printLinkedList(self):
node = self.head
while node != None:
print(node.getData())
node = node.getNext()