| 1 | initial version |
First off, you don't need itertools here since similar functionality is provides by Sage - try:
list( Permutations(l1,2) )
If you insist on using itertools.permutations, it want the second argument be of standard int type - this should the job:
list( itertools.permutations(l1,int(2)) )
| 2 | No.2 Revision |
First off, you don't need itertools here since similar functionality is provides by Sage - try:
list( Permutations(l1,2) )
If you insist on using itertools.permutations, it want wants the second argument be of standard int type (not Sage's sage.rings.integer.Integer') - this should the job:
list( itertools.permutations(l1,int(2)) )
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.