In our previous Python tutorial, you have learned how to convert string into Bytes in Python. In this tutorial, You will learn how to convert string to an array in Python.
String is the most used data type in any programming language. You can convert Strings into different data such as Bytes, JSON, Array, list etc. So here int this tutorial, we will expalin how to convert String into array using Python.
As in Python, Array is represented by List and we can assume list as an array. So, basicaly we will work on the list to convert string into list. Python has built-in split()
and list()
method to convert string into array or list. (more…)