Replaces the data occurrences in the string.

    Usage::

        >>> replace("Users are: John Doe, Jane Doe, Z6PO.", {"John" : "Luke", "Jane" : "Anakin", "Doe" : "Skywalker",
         "Z6PO" : "R2D2"})
        u'Users are: Luke Skywalker, Anakin Skywalker, R2D2.'

    :param string: String to manipulate.
    :type string: unicode
    :param data: Replacement occurrences.
    :type data: dict
    :return: Manipulated string.
    :rtype: unicode

def replace(string, data):
    """
    Replaces the data occurrences in the string.

    Usage::

        >>> replace("Users are: John Doe, Jane Doe, Z6PO.", {"John" : "Luke", "Jane" : "Anakin", "Doe" : "Skywalker",
         "Z6PO" : "R2D2"})
        u'Users are: Luke Skywalker, Anakin Skywalker, R2D2.'

    :param string: String to manipulate.
    :type string: unicode
    :param data: Replacement occurrences.
    :type data: dict
    :return: Manipulated string.
    :rtype: unicode
    """

    for old, new in data.iteritems():
        string = string.replace(old, new)
    return string