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