Answers for "python split on a split"

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
-3

python split string

UserInputs = []
UserInputs = input().split()
Posted by: Guest on March-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language