Use list comprehension:
[list(l[0]) for l in mylist]
Your input list simply contains nested lists of 1 element in each, so we need to use l[0] for each element. list() in a line creates a list of individual characters:
>>> mylist = [['ANTT'], ['XSOB']] >>> [list(l[0]) for l in mylist] [['A', 'N', 'T', 'T'], ['X', 'S', 'O', 'B']]
If you ever corrected your code to get a direct list of strings (without nested lists with one element), you only need to delete [0] :
>>> mylist = ['ANTT', 'XSOB'] >>> [list(l) for l in mylist] [['A', 'N', 'T', 'T'], ['X', 'S', 'O', 'B']]
source share