October 2023
Beginner to intermediate
215 pages
4h 3m
English
This chapter shows you how to work with strings in Python and perform various operations on strings, such as search and replace operations. This chapter will prepare you for the additional string-related tasks that are discussed in Chapter 6.
The first part of this chapter shows you how to “slice” and “splice” strings, as well as how to test for digits and alphabetic characters in a string.
The second part of this chapter shows you how to search and replace a string in other strings, and then how to remove leading and trailing characters. You will also see how to print text without the newline character and how to perform text alignment.
The third part of this chapter discusses dates and how to convert dates into ...
Read now
Unlock full access