119k views
2 votes
The assignment symbol can be combined with the arithmetic and concatenation operators to provide augmented assignment operations.

User Phoenix
by
5.4k points

1 Answer

2 votes

Answer:

Yes, we can.

Step-by-step explanation:

We can combine with the arithmetic and the concatenation operators to provide augmented assignment operations in the programming language Python.

This mean we can abbreviate expressions like n = n + 1

For example:

n += 10 this is equal to n = n + 10

n += "example" this is equal to n = n + "example"

In this example we have

variable = variable operator expression equal to variable operator = expression.

These arguments are often used in Python's loops.

User Caleb Bergman
by
5.8k points