Pack a series of arguments into a value Redis command

def encode(*args):
    "Pack a series of arguments into a value Redis command"
    result = []
    result.append("*")
    result.append(str(len(args)))
    result.append(DELIMITER)
    for arg in args:
        result.append("$")
        result.append(str(len(arg)))
        result.append(DELIMITER)
        result.append(arg)
        result.append(DELIMITER)
    return "".join(result)