Simon Forman wrote: > Finally, you can say: > > for i in xrange(1,10): > s = "XXX1%04i" % i > if s not in list1 and s not in list2: > print s > > HTH, > ~Simon
D'oh! Forgot to break. for i in xrange(1,10): s = "XXX1%04i" % i if s not in list1 and s not in list2: print s break Peace, ~Simon -- http://mail.python.org/mailman/listinfo/python-list