I have the next list with strings and a nested list inside. And I want to use two list comprehension to flat it:
I am trying to use two nested list comprehension :
tweet_list=['!iniciamos', 'la', ['mi', 'banco', 'banco', 'señal'], 'con', 'nuestro', 'invitado', 'especial']
flat=[]
flated_list= [[flat.append(sub_elem) for sub_elem in elem] if isinstance(elem,list) else flat.append(elem) for elem in tweet_list]
I am getting two nest lists of Nones. How could I fix it?