python add 1 to int code example
Example 1: python add one
addOne = 0
addOne += 1
Example 2: int + 1 int python
n = 12 # 'n' is a number
n += 1 # '+=' means that 'n' is equal the old 'n' + the number on the right. the number on the right can be any number
print(n)
Example 3: add 1 to int py
points = 0
def test():
nonlocal points
points += 1