parameters: (pattern, repl, string, count=0, flags=0)
return_statement: return _compile(pattern, flags).sub(repl, string, count)
docstring: Return the string obtained by replacing the leftmost
      non-overlapping occurrences of the pattern in string by the
      replacement repl.  repl can be either a string or a callable;
      if a string, backslash escapes in it are processed.  If it is
      a callable, it's passed the match object and must return
      a replacement string to be used.
docstring_summary: Return the string obtained by replacing the leftmost
      non-overlapping occurrences of the pattern in string by the
      replacement repl.  repl can be either a string or a callable;
      if a string, backslash escapes in it are processed.  If it is
      a callable, it's passed the match object and must return
      a replacement string to be used.
docstring_tokens: Return the string obtained by replacing the leftmost non - overlapping occurrences of the pattern in string by the replacement repl . repl can be either a string or a callable ; if a string backslash escapes in it are processed . If it is a callable it s passed the match object and must return a replacement string to be used .
function: def sub(pattern, repl, string, count=0, flags=0):
      """Return the string obtained by replacing the leftmost
      non-overlapping occurrences of the pattern in string by the
      replacement repl.  repl can be either a string or a callable;
      if a string, backslash escapes in it are processed.  If it is
      a callable, it's passed the match object and must return
      a replacement string to be used."""
      return _compile(pattern, flags).sub(repl, string, count)
function_tokens: def sub ( pattern , repl , string , count = 0 , flags = 0 ) : return _compile ( pattern , flags ) . sub ( repl , string , count )