a=[1,2,3,1,4,1,5]print a b=[i for i in a if i!=1]print b
Standard input is empty
[1, 2, 3, 1, 4, 1, 5] [2, 3, 4, 5]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!