Function Details: rsplit

Description


Returns a list of the words in the string, using sep as the delimiter string.


Extended Description


The rsplit() method splits a string into a list of substrings based on the specified separator. It starts splitting from the right side of the string. If a maxsplit value is specified, it performs at most maxsplit splits. If sep is not specified or is None, any whitespace string is a separator.


Read More about rsplit from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Parameter List


  • sep: str
  • maxsplit: int

Return


Returns a list of substrings


Return Type


List[str]

Output

Explanation

Basic usage of rsplit() to split a string by commas.