def printLinkedList(self): node = self.head while node != None: print(node.getData()) node = node.getNext()