("1 34 23 12 -89 11)
How do I make it like this:
['1','34','23','12','-89','11']
This is spaced string which I need to convert to a list.
The split
function can do this!
s = '1 34 23 12 -89 11'
l = s.split(' ') # ['1', '34', '23', '12', '-89', '11']
you can use split()
x="1 34 23 12 -89 11"
x.split()
output:
['1','34','23','12','-89','11']