def replace_all(text, replace_dict):
    """
    For every key, value pair in 'replace_dict', if there is a sub-string in 'text' that is equal to the key,
    replace it with the value. Return 'text' with all sub-strings replaced.
    """
    for i, j in replace_dict.iteritems():
        text = text.replace(i, j)
    return text