
[Python] Arithmetic in Python and Augmented Assignment
·
Programming
1. Precedence of Arithmetic OperationsHigher ** > -(negation) > * = / = // = % > + = -(subtraction) Lower우선순위를 기억하는 것도 중요하지만, 헷갈리면 그냥 parentheses로 묶어주면 된다. (가독성을 위해서도 이를 추천)동시에 3+2와 같은 간단한 expression은 굳이 parentheses로 묶지 말 것. (이 경우, 복잡한 expression등과 헷갈리게 됨)더보기그 외 연산자들:https://ds31x.tistory.com/54 * = / = // = % > + = -(subtraction) Lower우선순위를 기억하는 것도 중요하지만, 헷갈리면 그냥 parentheses로 묶어주면 된다. (..