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

# Simplify Division

#### Sourcery refactoring id: `simplify-division`

#### Description:

Use Python's built-in feature for succinct division syntax.

#### Before:

```python
result = int(42 / 10)
```

#### After:

```python
result = 42 // 10
```

#### Before:

```python
result = 42 // 10
remainder = 42 % 10
```

#### After:

```python
result, remainder = divmod(42, 10)
```

#### Explanation:

Python has some great features to simplify division expressions. If you're
interested only in the whole number component of the quotient, you can use the
`//` integer division operator. If you want to have the whole number component
and the remainder in separate variables, the built-in `divmod` function comes
handy.
