0
How do I use Python to transform the following string:
[[98 9] [55 16] [9 50] [68 0] [24 1] [80 16]]
in two numerical vector chains (the first string containing the first values:
98 55 9 ...
and the second vector containing the second values:
9, 16, 50 ...
Thank you very much Absolve, but I’m still not getting it... when I give one
print(type(lista)
is seeming the following message:<class 'str'>
I may have to do some conversion before to apply this solution. If you can help me in this conversion, I would be very grateful. Thank you very much!– Leonardo Grando
There is probably a way to generate this output in list, or matrix format, however if you want to transform exactly the way it is in separate lists, work with list(string.split(" ")), so you partition the list using a key, in this case a comma or spaces.
– Absolver