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)) )