2. Arithmetic, Strings, and Variables

The first step in learning how to program is to understand the basic Python data types: integers (whole numbers), floating point numbers (numbers with a decimal point), and strings. All programs use these (and other) data types, so it is important to have a good grasp of their basic uses.

Strings, in particular, are used in so many different kinds of programs that Python provides a tremendous amount of support for them. In this chapter, ...

Get Python: Visual QuickStart Guide, Third Edition 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.