Skip to content

Assignment-Operator

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.

Replace assignment with assignment operator

x = x + 1
x += 1

The augmented assignment operators, such as += are a more streamlined and easy to understand way to add values. Using them removes a little bit of repetition and makes the code slightly easier to understand.