UnorderedList class

An unordered list consists of an initial "head" of the list which may point to a Node, which in turn may point to other Node objects which collectively make up the entire list.

Write an UnorderedList class that begins with this constructor:

import Node

class UnorderedList(object):
"""Maintains an unordered list via a linked series of Nodes
"""

def __init__(self):
    self.head = None

Then continue developing the the class by writing the following methods:

In addition to these methods, it will certainly be helpful to you to have a __repr__ method that you can use to print out the state of your unordered list.

def __repr__(self):
    """Creates a representation of the list suitable for printing,
    debugging.
    """
    result = "UnorderedList["
    next_node = self.head
    while next_node != None:
        result += str(next_node.get_data()) + ","
        next_node = next_node.get_next()
    result = result + "]"
    return result