#!/bin/sh export DS_DIR=/home/cxy/test if [ ! -d $DS_DIR ]; then mkdir $DS_DIR else echo "$DS_DIR is not existed!" fi cd $DS_DIR ]; then echo "more than 2 dst_files in $DS_DIR" rm -r $(ls -rt | head -n2) fi…
def a4(arg): ret = {} for key,value in arg.items(): if len(value) > 2: ret[key] = value[0:2] else: ret[key] = value return ret dic = {"} r = a4(dic) print(r)…