def transform(text, transformations):
    """
    Replaces every occurrenc of transformation[0] with transformation[1]
    for every transformation in transformations.

    Input arguments:
        text -- text we are transforming
        transformations -- list of transformations
            Each transformation has:
                transformation[0] -- expresion to be transformed
                transformation[1] -- expresion to which it transforms

    Output:
        Transformed text.

    Example:
        >>> text = '''This is a test'''
        >>> transformations = [['is', 'was'], ['test', 'test!']]
        >>> print transform(text, transformations)
        Thwas was a test!
    """
    for transformation in transformations:
        text = text.replace(transformation[0], transformation[1])
    return text