摘要: 写函数,完成以下功能: # 例如有: user_list=[ {"name": "alex","hobby":"抽烟"}, {"name" :"alex","hobby":"喝酒"}, {"name" :"alex","hobby":"烫头"}, {"name":"wusir","hobby":&q 阅读全文
posted @ 2019-10-03 11:08 一心全意 阅读(460) 评论(0) 推荐(0) 编辑
摘要: # 杨辉三角 def triangle(): li = [1] while True: yield li lis = [] lis.extend([li[0]]) for j in range(len(li)-1): lis.append((li[j]+li[j+1])) ... 阅读全文
posted @ 2019-10-03 10:47 一心全意 阅读(289) 评论(0) 推荐(0) 编辑