摘要: def lst(list): #定义一个函数,创建一个列表 lst1 = [] #在函数中定义一个空列表 for i in range(len(list)): if i %2 ==1: #i为奇数 lst1.append(list[i]) #list[i]添加到lst1列表中 return lst1 阅读全文
posted @ 2020-06-23 23:16 cy583 阅读(3685) 评论(0) 推荐(0) 编辑