
8.2 String slicing - Introduction to Python Programming - OpenStax
Once a string object is created, the string's contents cannot be altered by directly modifying individual characters or elements within the string. Instead, to make changes to a string, a new string object …
Ch. 8 Introduction - Introduction to Python Programming | OpenStax
A string is a sequence of characters. Python provides useful methods for processing string values. In this chapter, string methods will be demonstrated including comparing string values, string slicing, …
8.5 Splitting/joining strings - Introduction to Python ... - OpenStax
The split () method, when applied to a string, splits the string into substrings by using the given argument as a delimiter. Ex: "1-2".split('-') returns a list of substrings ["1", "2"]. When no arguments are given to …
3.1 Strings revisited - Introduction to Python Programming - OpenStax
Python uses Unicode, the international standard for representing text on computers. Unicode defines a unique number, called a code point, for each possible character.
8.1 String operations - Introduction to Python Programming - OpenStax
Python has many useful methods for modifying strings, two of which are lower() and upper() methods. The lower () method returns the converted alphabetical characters to lowercase, and the upper () …
Answer Key Chapter 8 - Introduction to Python Programming | OpenStax
This free textbook is an OpenStax resource written to increase student access to high-quality, peer-reviewed learning materials.
8.3 Searching/testing strings - Introduction to Python ... - OpenStax
Consider a time value is given as part of a string using the format of "hh:mm" with "hh" representing the hour and "mm" representing the minutes. To retrieve only the string's minute portion, the following …
1.4 String basics - Introduction to Python Programming - OpenStax
A string is a sequence of characters enclosed by matching single (') or double (") quotes. Ex: "Happy birthday!" and '21' are both strings....
12.3 Recursion with strings and lists - Introduction to Python ...
12.3 Recursion with strings and lists Learning objectives By the end of this section you should be able to Demonstrate the use of recursion to solve a string problem. Demonstrate the use of recursion to …
3.2 Formatted strings - Introduction to Python Programming - OpenStax
A formatted string literal (or f-string) is a string literal that is prefixed with "f" or "F". A replacement field is an expression in curly braces ({})...