I am trying to convert a long string to a list of strings for each item separated with comma.
list = ['05-19.scl, 05-22.scl, 05-24.scl, 06-41.scl']
to :
desired_list= ['05-19.scl', '05-22.scl', '05-24.scl', '06-41.scl']
I am trying to convert a long string to a list of strings for each item separated with comma.
list = ['05-19.scl, 05-22.scl, 05-24.scl, 06-41.scl']
to :
desired_list= ['05-19.scl', '05-22.scl', '05-24.scl', '06-41.scl']
>>> listObj = ['05-19.scl, 05-22.scl, 05-24.scl, 06-41.scl']
>>> a = [x.split(',') for x in listObj][0]
>>> a
['05-19.scl', ' 05-22.scl', ' 05-24.scl', ' 06-41.scl']