On Thu, 09 May 2013 01:18:51 -0700, RAHUL RAJ wrote: > Then what about this code part?
What about it? > [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y] > > and the following code part: > > for x in [1,2,3]: > for y in [3,1,4]: > if x != y: > combs.append((x, y)) Apart from not defined combs, those two pieces of code are equivalent. So what is your question? -- Steven -- http://mail.python.org/mailman/listinfo/python-list