When I first started coding in Python more than a decade ago, I often wondered why there wasn’t a built-in increment (++) or decrement (–) operator like in C or Java.
If you’re new to Python, this can feel confusing at first. But don’t worry: Python makes this process simple and flexible with its own style.
In this tutorial, I’ll show you step-by-step how to increment and decrement values by 1 in Python. I’ll also share real-world examples from my projects in the USA, where I’ve used these techniques in loops, counters, and even data analysis tasks.
Python Increment By 1
Python Increments by 1 means increasing the value by a specific amount. In other programming languages like C, C++, etc., the operator ‘++’ is used to increment the value by a certain amount, but in Python, there is no ‘++’ operator to increment the value by a certain amount.
Increment Operator in Python
However, in Python, there is a way to increment the value by a specific amount; that way is using the ‘+=’ operator.
The syntax is given below.
variable +=increment_valueWhere,
- variable +=increment_value: This means increasing the variable value by increment_value.
For example, suppose you are creating a program to count the number of attendees entering an event. Initially, the variable count will have a value of zero.
But as soon as attendees enter the event, the value of the count variable must increase by one for each attendee, and you can do that using the ‘+=’ operator, as shown below.
attendee_count = 0
attendee_count+=1
print('Attendee count', attendee_count)You can see the output in the screenshot below.

If you again call attendee_count+=1, the variable attendee_count becomes 2 as the value increases by one. This is how you can use the Python increment operator ‘+=’ to increment the variable by 1.
Check out Find the Maximum Value in Python Using the max() Function
Increment and Decrement Operators in Python
In the preceding section, you learned about the increment operation ‘+=’: there is also a decrement operator, which is ‘-=’, that decreases the value by a specific amount.
The syntax is given below.
variable -=decrement_valueWhere,
- variable -=decrement_value: It means decreasing the variable value by decrement_value.
Again, let’s take the same attendees’ example, but this time, when attendees leave the event, the variable attendee_count value decreases by 1.
For example, if 50 attendees are present at the event, the value of attendee_count is 50, as shown below.
attendee_count = 50Now, one attendee leaves the event, so the value of attendee_count must decrease, which can be done using the ‘-=’ operator, as shown below.
attendee_count -=1
print('Attendee count', attendee_count)You can see the output in the screenshot below.

This is how you can use the Python decrement operator ‘-=’ to decrement the variable by 1.
Difference Between Increment and Decrement Operators in Python
Let me explain to you the difference between Python increment and decrement operators.
| Aspect | Increment Operator in Python | Decrement Operator in Python |
|---|---|---|
| Operators Used | We use ‘+=’ or ‘+’ operators as increment operator in Python | We use ‘-=’ or ‘-‘ operators as decrement operator in Python |
| Effects | Increases the variable by a specified value. | Decreases the variable by a specified value. |
| Syntax | ‘x += 1’ or ‘x = x + 1’ | ‘y -= 1’ or ‘y = y – 1’ |
| Usage | Typically used in loops, counters, or variable updates. | Can we use two strings in Python, but with str and numbers? |
| Can we use two strings in Python but with str and numbers? | Throw ValueError cannot be used with two strings in Python or a string with numbers. |
Conclusion
In this Python tutorial, you learned about Python increment by 1 with syntax and examples.
You also learned about the decrement operator ‘-=’ to decrease the variable value by a certain amount. Additionally, you knew the difference between increment and decrement operators in Python.
You may like to read:
- Pop() List Python
- EXIT Function in Python
- Leap Year Program in Python using Function
- Python Function to Find the Max of Three Numbers

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.