# sequence¶

`topleveltools.``sequence`(items=None, **keywords)

Makes sequence or sequence expression.

```>>> import abjad
```

Makes sequence:

```>>> abjad.sequence([1, 2, [3, [4]], 5])
Sequence([1, 2, [3, [4]], 5])
```

Makes sequence expression:

```>>> expression = abjad.sequence()
>>> expression([1, 2, [3, [4]], 5])
Sequence([1, 2, [3, [4]], 5])
```

Flattens, reverses and slices sequence:

```>>> sequence_ = abjad.sequence([1, 2, [3, [4]], 5])
>>> sequence_
Sequence([1, 2, [3, [4]], 5])
```
```>>> sequence_ = sequence_.flatten()
>>> sequence_
Sequence([1, 2, 3, 4, 5])
```
```>>> sequence_ = sequence_.reverse()
>>> sequence_
Sequence([5, 4, 3, 2, 1])
```
```>>> sequence_ = sequence_[-3:]
>>> sequence_
Sequence([3, 2, 1])
```
```>>> expression = abjad.sequence()
>>> expression = expression.flatten()
>>> expression = expression.reverse()
>>> expression = expression[-3:]
>>> expression([1, 2, [3, [4]], 5])
Sequence([3, 2, 1])
```

Returns sequence when items is not none.

Returns sequence expression when items is none.