首页 > 编程语言 > 详细

python

时间:2017-09-13 01:28:59      阅读:280      评论:0      收藏:0      [点我收藏+]
f =map(lambda x:x*5,range(1,11))
print f

l = ["tom","lucy"]
print "*".join(l)

def f(x):
    return x *5
print map (f,[1,2,3,4,5])

print map(lambda x:x*5,[1,2,3,4,5])

print reduce(lambda x,y:x+y,[1,2,3,4,5])
print "\n".join(map(lambda x:" "*(2*5-2*x) + (x + 1)*"love",[0,1,2,3,4,3,2,1,0]    ))


python

原文:http://13297756.blog.51cto.com/13287756/1964756

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!