Example

S3 has the following 6 elements:

1 2 3
1 2 3
1 2 3
1 3 2
1 2 3
3 2 1
1 2 3
2 1 3
1 2 3
3 1 2
1 2 3
2 3 1

Instead of the conventional matrix notation, we also write matrices as lists of lists. The above permutations in this notation are

[[1, 2, 3], [1, 2, 3]], [[1, 2, 3], [1, 3, 2]], [[1, 2, 3], [3, 2, 1]],

[[1, 2, 3], [2, 1, 3]], [[1, 2, 3], [3, 1, 2]], [[1, 2, 3], [2, 3, 1]].

In the so-called list notation we leave out the first row, since that row is always the same. Here are the 6 permutations again in list notation:

[1, 2, 3], [1, 3, 2], [3, 2, 1], [2, 1, 3], [3, 1, 2], [2, 3, 1].