> ## 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.

# Remove Redundant Continue

#### Sourcery refactoring id: `remove-redundant-continue`

#### Description:

Remove redundant `continue` statement

#### Before:

```python
mylist2 = []
for i in mylist:
    if i != 2:
        mylist2.append(i)
    else:
        continue
```

#### After:

```python
mylist2 = []
for i in mylist:
    if i != 2:
        mylist2.append(i)
```

#### Explanation:

If a `continue` is not followed by any other statements in a `for` or `while`
loop then it is not necessary, so can be removed. Removing unnecessary lines
declutters the code and makes it easier to understand. This refactoring will
only be triggered if it unlocks further improvements.
