defa(org): c= {} forkey,valueinorg.items(): iflen(value) >2: c[key] =value[0:2] else: c[key] =valuereturncdic={"k1":"ok!","k2":[1,2,3,4],"k3":[10,20]} r=a(dic) print(r)
defa(org): c= {} forkey,valueinorg.items(): iflen(value) >2: c[key] =value[0:2] else: c[key] =valuereturncdic={"k1":"ok!","k2":[1,2,3,4],"k3":[10,20]} r=a(dic) print(r)