0 votes
in Python by
Why do we use the split method in Python?

1 Answer

0 votes
by
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’]
...