Re: Simple if-else question

2009-09-30 Thread dksr
imilar to if-else and in if- else, else part is executed only when if part is not executed, but in for-else it has entirely a different job. Thats somewhat confusing, though it will be clear after playing around with it. - dksr -- http://mail.python.org/mailman/listinfo/python-list

Re: all possible matchings of elements of two lists

2009-08-26 Thread dksr
Ok this is how I do it: l1 = [1,2] l2= ['a','b','c'] res = [] l2 = permute(l2) for i in l2: lis = [l1,l2] res.append(zip(*lis)) # or use map depending on what u want res.append(map(None,*lis)) print res On Aug 26, 11:05 am, Sandy wrote: > Hi all, > I basically want all possible m