• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Python by
Q:
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’]

Related questions

0 votes
asked May 17, 2020 in Python by sharadyadav1986
+1 vote
asked May 23, 2020 in Python by sharadyadav1986
...