---
title: Do Not Leave Unused Variables
impact: MEDIUM
impactDescription: reduces noise and potential bugs
tags: clean-code, quality, python
---

## Do Not Leave Unused Variables

Variables that are declared but never used indicate unfinished work or bugs.

**Incorrect:**
```python
def process(data):
    result = transform(data)
    temp_var = 10  # Never used
    return result
```

**Correct:**
```python
def process(data):
    return transform(data)
```
