> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge List Extend

#### Sourcery refactoring id: `merge-list-extend`

#### Description:

Create the list with values instead of creating an empty list and extending it
with another list

#### Before:

```python
hats_i_own = []
hats_i_own.extend(["panama, baseball_cap, bowler"])
```

#### After:

```python
hats_i_own = ["panama", "baseball_cap", "bowler"]
```

#### Explanation:

When declaring a list with values it is much clearer to do so on one line rather
than declaring an empty list and then extending it with values.
