data=[0,9,3,2,1,3,2,-2,-1] result=[x for x in data if x >=0 ] 转载于:https://www.cnblogs.com/sea-stream/p/10216476.html