9.1. Strings#
A string is a sequence of characters enclosed in quotes. A character can be a letter (in almost any alphabet), a digit, a punctuation mark, or white space.
It should be noted that strings are immutable, meaning after creation, they cannot be modified or updated.
Strings are one of the most commonly used data types in Python, and Python provides a rich set of built-in operations and methods for working with them.
In this section we cover:
Creating strings
Indexing and slicing
Concatenation and repetition
Case methods
Searching and testing
Cleaning
Splitting and joining
String formatting
Type-checking methods
String comparison
Docstrings
Application