1There is no Increment Decrement Operator in Python
2Use Assignment Operators
3
4i += 1
5i -= 1
1# A Sample Python program to show loop (unlike many
2# other languages, it doesn't use ++)
3# this is for increment operator here start = 1,
4# stop = 5 and step = 1(by default)
5print("INCREMENTED FOR LOOP")
6for i in range(0, 5):
7 print(i)
8
9# this is for increment operator here start = 5,
10# stop = -1 and step = -1
11print("\n DECREMENTED FOR LOOP")
12for i in range(4, -1, -1):
13 print(i)