Post

PythonPython

v
veerubhotla sowmithri

Posted on 26th February 2024|14 views

0
votes

Python Split String Into Array

How to split a string into an array in python?

Answers
P
imran mohammad

Posted on 26th February 2024

We can split a string into an array by using a method called txt.split() for example:

txt = "this is mindmajix"

y = txt.split()

print(y)

 

Output:

[‘this', 'is', 'mindmajix']

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos