I have many lists:
['it']
['was']
['annoying']
I want to merge those into a single list:
['it', 'was', 'annoying']
I have many lists:
['it']
['was']
['annoying']
I want to merge those into a single list:
['it', 'was', 'annoying']
import itertools
ab = itertools.chain(['it'], ['was'], ['annoying'])
list(ab)
Just another method....
Just add them:
['it'] + ['was'] + ['annoying']
You should read the Python tutorial to learn basic info like this.
a = ['it']
b = ['was']
c = ['annoying']
a.extend(b)
a.extend(c)
# a now equals ['it', 'was', 'annoying']