increment syntax in python code example Example 1: increment python number += 1 Example 2: how to increment a variable in python] variable += 1