Print the Elements of a Linked List

  • + 0 comments

    def printLinkedList(head):

    current = head
    while current is not None:
        print(current.data)
        current = current.next