L=[1, 2, 3, 4, 5, 6, 7, 8, 9] def strcat(L):     a=[str(i) for i in L]         a="".join(a)     return a def loop(L):     a=""     for x in L:         a+=str(x)     return a from functools import reduce def adfun(L):     return reduce(lambda x,y:x+y,map(str,L))      a=strcat(L) b=loop(L) c=adfun(L)
点赞 1

相关推荐

10-09 19:08
已编辑
门头沟学院 Java
后端转测开第一人:换个模版 技术栈写的精炼紧凑一点 多投就行
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务