Back to General discussions forum
how do I convert a dataset that is not in list format easily? I can add [] and ,'s manually but that would take a long time. I should specify that this is for Python
Hi there!
Your idea (adding commas and brackets manually) is not that bad if you do this with auto-replace feature in text editor (probably even "notepad" can substitute spaces with commas).
However you are right - there should be some "more programmatic" approach, like this:
split
it by spacesint
Hope this helps. (find precise examples of each of three steps with google - this may be slightly different in two python versions)