string.split()

string.split()

string.split() method

.split(sep=None, maxsplit=-1)
>>> '1,2,3'.split(',')
['1', '2', '3']
>>> '1,2,3'.split(',', maxsplit=1)
['1', '2,3']
>>> '1,2,,3,'.split(',')
['1', '2', '', '3', '']

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

Related concepts

string.split()

string.split() — Structure map

Clickable & Draggable!

string.split() — Related pages: