© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
G. GutaPragmatic Python Programminghttps://doi.org/10.1007/978-1-4842-8152-9_1

1. Expression: How to Compute

Gabor Guta1  
(1)
Budapest, Hungary
 

“Expressions are formed from operators and operands.”

Brian W. Kernighan, Dennis M. Ritchie

One of the basic building blocks of programming languages is the expression, which serves to describe a logical or mathematical relation . In this chapter, you will learn how exactly an expression denotes relations between objects, how expressions can be used in statements, and how the objects can be labeled by names.

As an example, take the calculation of the price of an order. The formula is as follows: the price of the product ...

Get Pragmatic Python Programming: Learning Python the Smart Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.