Answers for "how to use split() function in python"

12

python split

>>> '1,2,3'.split(',')
['1', '2', '3']
>>> '1,2,3'.split(',', maxsplit=1)
['1', '2,3']
>>> '1,2,,3,'.split(',')
['1', '2', '', '3', '']
Posted by: Guest on November-18-2020

Code answers related to "how to use split() function in python"

Python Answers by Framework

Browse Popular Code Answers by Language