python increment int by 1 code example Example 1: ++ variable python # similar to number++ number += 1 Example 2: python increment by 1 #a = a + 1 a += 1