I have a list which contains list of words.
Example:
[['A','B','C'],['D'],['E']]
To implement this i have create an empty list of list of size 4.
list1=[list()] *4
and then tried append element one by one.
list1[0].append('A')
list1[0].append('B')
list1[0].append('C')
list1[1].append('D')
list1[2].append('E')
Output:
[['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E'], ['A', 'B', 'C', 'D', 'E']]
Expected was:
[['A','B','C'],['D'],['E']]