Login
Remember
Register
Ask a Question
Why do we use the split method in Python?
0
votes
asked
May 17, 2020
in
Python
by
SakshiSharma
Why do we use the split method in Python?
#python-split-method
#split-method
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 17, 2020
by
sharadyadav1986
split() method in Python is mainly used to separate a given string.
Example:
1
2
x = "Madanswer Online Training"
print(a.split())
Output:
1
[‘Madanswer’, ‘Online’, ‘Training’]
...