A Byte of Python

Chapter 5. Operators and Expressions

Table of Contents

Introduction
Operators
Operator Precedence
Order of Evaluation
Associativity
Expressions
Using Expressions
Summary

Introduction

Most statements (logical lines) that you write will contain expressions. A simple example of an expression is 2 + 3. An expression can be broken down into operators and operands.

Operators are functionality that do something and can be represented by symbols such as + or by special keywords. Operators require some data to operate on and such data are called operands. In this case, 2 and 3 are the operands.