increment i in for loop python code example

Example 1: increment python

number += 1

Example 2: python for loop with increment

lis = [1, 2, 3, 4, 5]
for i in range(len(lis)):
  print(lis[i])
  i+=1

Example 3: python increment by 1

#a = a + 1
a += 1

Example 4: python increment

# A Sample Python program to show loop (unlike many 
# other languages, it doesn't use ++) 
# this is for increment operator here start = 1,  
# stop = 5 and step = 1(by default) 
print("INCREMENTED FOR LOOP") 
for i in range(0, 5): 
   print(i) 
  
# this is for increment operator here start = 5,  
# stop = -1 and step = -1  
print("\n DECREMENTED FOR LOOP") 
for i in range(4, -1, -1): 
   print(i)