def f1(*p): for i in p: # print(i) l = len(i) if l > 2: return(i[:2]) else: return (i) ret = f1([11,22,33]) print(ret)
时间: 2024-10-08 15:29:10
def f1(*p): for i in p: # print(i) l = len(i) if l > 2: return(i[:2]) else: return (i) ret = f1([11,22,33]) print(ret)