Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split() vs split()

# split() vs split(' ')
sample = "a  b "
sample.split()
>>> ['a', 'b']
sample.split(' ')
>>> ['a', '', 'b', '']
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+7 =