Skip to main content

split

Splits a string by a separator and returns a list.

split(separator, str)

Parameters#

  • separator: Separator used to split given str
  • str: Target string to split

Returns#

  • List of strings after splitting

Example#

split(' ', 'Some dogs are funny')# returns: ['Some', 'dogs', 'are', 'funny']