"Batista, Facundo" <FBatista at uniFON.com.ar> writes: > #- foo = [ i for i in bar while len(i)>0 ] > > You have the 'if' statement: > > >>> bar = range(-5,5) > >>> bar > [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4] > >>> foo = [i for i in bar if i>0] > >>> foo > [1, 2, 3, 4] Not the same. Try bar = [1, 2, -3, 4, 5]