def splice(l, a, b, c):
    """ JS's Array.prototype.splice
    var x = [1, 2, 3],
        y = x.splice(0, 2, 1337);
    eq
    x = [1, 2, 3]
    x, y = splice(x, 0, 2, 1337)
    """
    return l[:a] + [c] + l[a + b:], l[a:a + b]
