def prepend_keys_with(d, s):
    """
    Prepends all the keys in dictionary D with S, e.g.

    {'blah': 100} -> {'fooblah': 100} (where S == 'foo')

    Undefined if any of D's keys aren't strings.
    """
    d2 = {}
    for key in d.keys():
        d2[s + key] = d[key]
    return d2