- Learn Python by Building Data Science Applications
- Philipp Kats David Katz
- 45字
- 2021-06-24 13:05:57
Order of execution
The order of execution works as in standard arithmetic calculations. This means we can use parentheses in our code:
>>> (2 + 10) / 2
6.0
>>> 10 / (1 + 1)
5.0
There could be any number of nested parentheses.