Re: [sage-support] Permutations with itertools.chain

2010-04-14 Thread William Laffin
Thank you Mike and Jason! I completely forgot about the * notation. You have both been very helpful. On Wed, Apr 14, 2010 at 9:41 PM, Mike Hansen wrote: > On Wed, Apr 14, 2010 at 11:39 AM, William Laffin > wrote: >> Hello helpful sage-support list! >> >> Is this the following normal behavior?

Re: [sage-support] Permutations with itertools.chain

2010-04-14 Thread Mike Hansen
On Wed, Apr 14, 2010 at 11:39 AM, William Laffin wrote: > Hello helpful sage-support list! > > Is this the following normal behavior? > ... > sage: for x in itertools.chain(itertools.imap(Permutations,range(4))): >    print x > : > Standard permutations of 0 > Standard permutations of 1 > Stan

[sage-support] Permutations with itertools.chain

2010-04-14 Thread William Laffin
Hello helpful sage-support list! Is this the following normal behavior? sage: import itertools sage: for x in itertools.imap(Permutations,range(4)): : for y in x: : print y : [] [1] [1, 2] [2, 1] [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1] sage: for x in it