diff --git a/concepts/string-methods/about.md b/concepts/string-methods/about.md index 308b89d9d6a..4f9dcde5dd0 100644 --- a/concepts/string-methods/about.md +++ b/concepts/string-methods/about.md @@ -5,7 +5,8 @@ This may include letters, diacritical marks, positioning characters, numbers, cu Strings implement all [common sequence operations][common sequence operations] and can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. Individual code points (_strings of length 1_) can be referenced by `0-based index` number from the left, or `-1-based index` number from the right. - Strings can be concatenated with `+`, or via `.join()`, split via `.split()`, and offer multiple formatting and assembly options. + + Strings can be concatenated using ` + ` or `.join()`, split via `.split()`, and offer multiple formatting and assembly options. To further work with strings, Python provides a rich set of [string methods][str-methods] for searching, cleaning, transforming, translating, and many other operations. diff --git a/concepts/string-methods/introduction.md b/concepts/string-methods/introduction.md index e20e58e7014..941e4e81bb1 100644 --- a/concepts/string-methods/introduction.md +++ b/concepts/string-methods/introduction.md @@ -4,9 +4,10 @@ A `str` in Python is an [immutable sequence][text sequence] of [Unicode code poi These may include letters, diacritical marks, positioning characters, numbers, currency symbols, emoji, punctuation, various spaces, line breaks, and more. Strings implement all [common sequence operations][common sequence operations] and can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. -They can be concatenated with `+`, or via `.join()`, split via `.split()`, and offer multiple formatting and assembly options. +They can be concatenated using ` + ` or `.join()`, split with `.split()`, and offer multiple formatting and assembly options. To further work with strings, Python provides a rich set of [string methods][str-methods] that can assist with searching, cleaning, transforming, translating, and many other operations. + Being _immutable_, a `str` object's value in memory doesn't change; methods that appear to modify a string return a new copy or instance of that `str` object. [common sequence operations]: https://docs.python.org/3/library/stdtypes.html#common-sequence-operations diff --git a/concepts/strings/about.md b/concepts/strings/about.md index 227a252e821..fe49f6208a5 100644 --- a/concepts/strings/about.md +++ b/concepts/strings/about.md @@ -9,10 +9,10 @@ The Python docs also provide a very detailed [unicode HOWTO][unicode how-to] tha Strings implement all [common sequence operations][common sequence operations] and can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. Individual code points (_strings of length 1_) can be referenced by `0-based index` number from the left, or `-1-based index` number from the right. -Strings can be concatenated with `+`, or via `.join()`, split via `.split()`, and offer multiple formatting, assembly, and templating options. +Strings can be concatenated with ` + `, or `.join()`, split via `.split()`, and offer multiple formatting, assembly, and templating options. -A `str` literal can be declared via single `'` or double `"` quotes. The escape `\` character is available as needed. +A `str` literal can be declared using single `'` or double `"` quotes. The escape `\` character is available as needed. ```python diff --git a/concepts/strings/introduction.md b/concepts/strings/introduction.md index 61b5fbd5795..e213b0fbea4 100644 --- a/concepts/strings/introduction.md +++ b/concepts/strings/introduction.md @@ -5,7 +5,7 @@ These could include letters, diacritical marks, positioning characters, numbers, Strings implement all [common sequence operations][common sequence operations], and can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. -Strings can be concatenated with `+`, or via `.join()`, split via `.split()`, and offer multiple types of formatting, interpolation, and templating. +Strings can be concatenated with ` + `, or `.join()`, split via `.split()`, and offer multiple types of formatting, interpolation, and templating. Being immutable, a `str` object's value in memory doesn't change; methods that appear to modify a string return a new copy or instance of `str`. diff --git a/exercises/concept/little-sisters-essay/.docs/introduction.md b/exercises/concept/little-sisters-essay/.docs/introduction.md index fc327a12505..0eacedfee07 100644 --- a/exercises/concept/little-sisters-essay/.docs/introduction.md +++ b/exercises/concept/little-sisters-essay/.docs/introduction.md @@ -3,10 +3,11 @@ The `str` class offers [many useful methods][str methods] for working with and composing strings. These include searching, cleaning, splitting, transforming, translating, and many other techniques. -Strings are [immutable sequences][text sequence] of [Unicode code points][unicode code points] -- individual "characters" or code points (_strings of length 1_) can be referenced by `0-based index` number from the left, or `-1-based index` number from the right. +Strings are [sequences][text sequence] of [Unicode code points][unicode code points] -- individual "characters" or code points (_strings of length 1_) can be referenced by `0-based index` number from the left, or `-1-based index` number from the right. +Strings implement all [common sequence operations][common sequence operations]. -Strings can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. -They can be concatenated using the `+` operator or via `.join()` and implement all [common sequence operations][common sequence operations]. +They can be iterated through using `for item in ` or `for index, item in enumerate()` syntax. +They can also be concatenated using ` + ` or `.join()`. Strings are _immutable_, meaning the value of a `str` object in memory cannot change. Functions or methods that operate on a `str` (_like the ones we are learning about here_) will return a new `instance` of that `str` object instead of modifying the original `str`.