July 2023
Beginner to intermediate
448 pages
10h 57m
English
Strings are probably the most important data structure for everyday computing. They’re used in practically every kind of program imaginable, and are also the raw material of the Web. As a result, strings make an excellent place to start our Python programming journey.
Strings are made up of sequences of characters in a particular order.1 We’ve already seen several examples in the context of our “hello, world” programs in Chapter 1. Let’s see what happens if we type a string by itself (without print()) into the Python REPL:
$ source venv/bin/activate
(venv) $ python3
>>> "hello, world!"
'hello, world!'
1. Like many other high-level languages, such as JavaScript and Ruby, Python “characters” are just strings ...
Read now
Unlock full access