
Chapter 11
Strings
Strings are a basic data type in Python; the others you have seen so far are
integer, float, and boolean. Each data type stores its information in a different
way and supports a different set of operations. Whereas integers, floats, and
booleans are each single pieces of data, strings provide our first example of a
data structure, which is a collection of data organized to efficiently support
a particular set of access methods and operations.
A Python string is a sequence of characters inside quotation marks, either
single (’) or double ("). Python also uses a form of triple quotes that you can
read about in the documentation. We used strings ...