split() - Splits the string at the specified separator, and returns a list

Splits the string by the given separator, from left to right.  An array is returned for the separated strings.  And optional number of occurrences can be specified.

Example

Python
str = 'You say tomato, I say tomato, the French say tomate.'
print(str.split('tomato'))
print(str.split('tomato', 1))

Output

['You say ', ', I say ', ', the French say tomate.']
['You say ', ', I say tomato, the French say tomate.']