user image

Preeti Tripathi

Job Interview Skills
English
3 years ago

28. What do the split(), sub(), and subn() Python methods of the "re" module mean?

user image

Abhishek Mishra

3 years ago

These methods are used to alter strings and are a part of the Python RegEx or "re" package. Splitting a string into a list is done using the split() method.Substrings that match a regex pattern are found using the sub() method, which then substitutes the matching substring with a different string.

Recent Doubts

Close [x]