#!/usr/local/bin/python2 it = [e for e in [1,2,3] if e == 4][:-1] next(it) print list(it)