#!/usr/local/bin/python2 l = [0,1,2,3,4,5,6,7,8,9] for i in xrange(1000000): j = l[:] j.reverse() k = -10 - j.index(0) print k