color = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow'] color = [x for (i,x) in enumerate(color) if i not in (0,4,5)] print(color)
python 列表元素的筛选
猜你喜欢
转载自www.cnblogs.com/sea-stream/p/9971288.html
今日推荐
周排行