import functools


def replace_all(text, replacements):
    """
    Replace in `text` all strings specified in `replacements`
    Example: replacements = ('hello', 'goodbye'), ('world', 'earth')
    """
    return functools.reduce(lambda a, kv: a.replace(*kv), replacements, text)