1 | initial version |
Like this
sage: L=['a','b','c','d','e','f','g','h']
....: test=Permutation((1,5,8,4),(2,6,7,3))
sage: [lettersL[test(i+1)-1] for i in range(len(L))]
['e', 'b', 'c', 'a', 'h', 'f', 'g', 'd']
Note that Python numbering starts from 0.
2 | No.2 Revision |
Like this
sage: L=['a','b','c','d','e','f','g','h']
....: test=Permutation((1,5,8,4),(2,6,7,3))
L = ['a','b','c','d','e','f','g','h']
sage: [lettersL[test(i+1)-1] test = Permutation((1,5,8,4),(2,6,7,3))
sage: [lettersL[test(i + 1) - 1] for i in range(len(L))]
['e', 'b', 'c', 'a', 'h', 'f', 'g', 'd']
Note that Python numbering starts from 0.
3 | No.3 Revision |
Like this
sage: L = ['a','b','c','d','e','f','g','h']
sage: test = Permutation((1,5,8,4),(2,6,7,3))
sage: [lettersL[test(i [L[test(i + 1) - 1] for i in range(len(L))]
['e', 'b', 'c', 'a', 'h', 'f', 'g', 'd']
Note that Python numbering starts from 0.