I have a list object of Strings as given below:
s = ['ABC','DEF','GHI','JKL']
I want to store the individual characters as a list of list items separately as below:
output = [['A','B','C'],['D','E','F'],['G','H','I'],['J','K','L']]
I know I can extract the individual items using their indexes. But am not able to store them in the above given manner. Could someone please help me out..!
use a list comprehension:
or use
map():