Post
Python
Posted on 20th April 2024|14 views
How to split a string into an array in python?
Posted on 20th April 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']
STILL GOT QUERIES?