tg-me.com/python_codes/212
Last Update:
Explain split(), sub(), subn() methods of “re” module in Python?
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.
Share and Support
@Python_Codes
BY Python Codes
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Share with your friend now:
tg-me.com/python_codes/212