These methods belong to the Python RegEx or 're' module and are used to modify strings.
split(): This method is used to split a given string into a list.
sub(): This method is used to find a substring where a regex pattern matches, and then it replaces the matched substring with a different string.
subn(): This method is similar to the sub() method, but it returns the new string, along with the number of replacements.
Learn more about Python from this Python Training in New York to get ahead in your career!