I was going through this post, which has some great answers, but it does not work for my situation.
I have a list like this:
my_list = [['Hi'],['Hello'],['How', 'are'], ['you']]
I did the flattening and I am getting this,
my_flat_list = [i[0] for i in my_list]
my_flat_list
>>['Hi', 'Hello', 'How', 'you']
If I don't use i[0]
I get in list format again.
The output I need is:
['Hi', 'Hello', 'How are', 'you']
I also tired this post using itertools
still not getting my desired results.
How can I get my output?