[Solved] merge list of nested list to a single list which has lakhs of data python [duplicate]


from itertools import chain

l =  [['password', '_rev', '_id', 'username'], ['password', '_rev', '_id', 'username', 'name'], ['password', '_rev', '_id', 'username'],['password', '_rev', '_id', 'username','country']]
list(set(chain(*l)))

Output –

['username', '_rev', '_id', 'name', 'password', 'country']

solved merge list of nested list to a single list which has lakhs of data python [duplicate]