Last active
February 5, 2023 17:19
-
-
Save dichharai/bd55dbe582b237ed6437170e1138888d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Method/Attribue | Purpose | |
---|---|---|
split() | Split the string into a list; splitting it whenever the RE matches | |
sub() | Find all substrings where the RE matches and replace them with a different string | |
subn() | Does the same thing as sub() but returns the new string and the number of replacements. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment