python auto increment operator code example Example 1: python increment by 1 #a = a + 1 a += 1 Example 2: increment by 1 #increment by 1 a += 1