What I'd like is this:
>>> [i if i!= 0 for i in [0,1,2,3]]
[1,2,3]
just like
>>> [i for i in [1,2,3,4]]
[1,2,3,4]
What's the simple solution that doesn't yield a syntax error?
Edit: assuming I don't want to use a for loop and appending all elements to a new list.