Chapter 11
Working with Strings
In This Chapter
Considering the string difference
Using special characters in strings
Working with single characters
Performing string-specific tasks
Finding what you need in a string
Modifying the appearance of string output
Your computer doesn’t understand strings. It’s a basic fact. Computers understand numbers, not letters. When you see a string on the computer screen, the computer actually sees a series of numbers. However, humans understand strings quite well, so applications need to be able to work with them. Fortunately, Python makes working with strings relatively easy. It translates the string you understand into the numbers the computer understands, and vice versa.
In order to make strings useful, you need to be able to manipulate them. Of course, that means taking strings apart and using just the pieces you need or searching the string for ...
Get Beginning Programming with Python For Dummies 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.