I have :
val = '[12 13 14 16 17 18]'
I want to have:
['12','13','14','16','17','18']
I have done
x = val.split(' ')
y = (" , ").join(x)
The result is
'[12 , 13 , 14 , 16 , 17 , 18 ]'
But not the exact one also the quotes
What's the best way to do this in Python?