Fixed spelling errors in approaches docs. (#3804)

This commit is contained in:
BethanyG
2024-10-31 14:34:29 -07:00
committed by GitHub
parent 694a421e02
commit dc66e5964c
3 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ A [`generator-expression`][generator-expression] is then used to iterate through
Generator expressions are short-form [generators][generators] - lazy iterators that produce their values _on demand_, instead of saving them to memory.
This generator expression is consumed by [`str.join()`][str-join], which joins the generated letters together using an empty string.
Other "seperator" strings can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Other "separator" strings can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Since the generator expression and `join()` are fairly succinct, they are put directly on the `return` line rather than assigning and returning an intermediate variable for the acronym.

View File

@@ -25,7 +25,7 @@ As of this writing, both of these methods benchmark slower than using `str.repla
A [`list comprehension`][list comprehension] is then used to iterate through the phrase and select the first letters of each word via [`bracket notation`][subscript notation].
This comprehension is passed into [`str.join()`][str-join], which unpacks the `list` of first letters and joins them together using an empty string - the acronym.
Other "seperator" strings besides an empty string can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Other "separator" strings besides an empty string can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Since the comprehension and `join()` are fairly succinct, they are put directly on the `return` line rather than assigning and returning an intermediate variable for the acronym.

View File

@@ -74,7 +74,7 @@ Note that when using `finditer()`, the `Match object` has to be unpacked via `ma
Generator expressions are short-form [generators][generators] - lazy iterators that produce their values _on demand_, instead of saving them to memory.
This generator expression is consumed by [`str.join()`][str-join], which joins the generated letters together using an empty string.
Other "seperator" strings can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Other "separator" strings can be used with `str.join()` - see [concept:python/string-methods]() for some additional examples.
Finally, the result of `.join()` is capitalized using the [chained][chaining] [`.upper()`][str-upper].