listtools.permutations — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# listtools.permutations

`abjad.tools.listtools.` `permutations`(l)

  Yield all permutations of `l`.

      abjad> l = [1, 2, 3]
      abjad> listtools.permutations(l)
      <generator object at 0x118c0d0>
      abjad> list(_)
      [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]

  Note

  This is a stop-gap for Python 2.5 because the 2.6 implementation of `itertools` includes a built-in `permutations` function.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »