#!/usr/local/bin/python2 l = [] for i, e in enumerate(l): if e == 3: del l[i + 1:] print i, e print l