22
33A string (` str ` ) in Python is a sequence of Unicode code points which
44include letters, numbers, symbols, punctuation, etc. Strings
5- implement all of the [ common sequence operations] ( https:/docs.python.org/3/library/stdtypes.html#typesseq- common) ,
5+ implement all of the [ common sequence operations] [ types seq common] ,
66along with iteration using the ` for item in <string> ` syntax.
77
8- Python provides a number of useful methods that you can use to manipulate
8+ Python provides several useful methods that you can use to manipulate
99strings. These string methods can be used for cleaning, splitting, translating,
1010or otherwise working with the ` str ` type. New strings can be created based
1111on method arguments, and/or additional information can be returned. Strings
1212can be concatenated using the ` + ` operator or with ` str.join() ` .
1313
1414Some of the more commonly used methods include:
1515
16- - Checking for prefixes/suffixes with ` startwith ()` and ` endswith() `
16+ - Checking for prefixes/suffixes with ` startswith ()` and ` endswith() `
1717- Altering string casing with methods like ` upper() ` , ` lower() ` , and ` swapcase() `
1818- Removing leading or trailing characters from a string using ` strip() ` , ` lstrip() ` , or ` rstrip() `
1919- Replacing substrings with the ` replace() ` method
@@ -22,5 +22,7 @@ Some of the more commonly used methods include:
2222
2323The ` str ` type is _ immutable_ , so all of these methods will return a new ` str ` instead of modifying the existing one.
2424
25- For more information, you can check out the
26- [ official documentation] ( https://docs.python.org/3/library/stdtypes.html#string-methods ) .
25+ For more information, you can check out the [ official documentation] [ official documentation ] .
26+
27+ [ types seq common ] : https://docs.python.org/3/library/stdtypes.html#typesseq-common
28+ [ official documentation ] : https://docs.python.org/3/library/stdtypes.html#string-methods
0 commit comments