if flattend is just a list of strings, for example
['There','is','only','passion','and','piece','is','a','lie','lie','lie']
then in following two lines
c = Counter(flattened)
vocab = [x for x, count in c.items() if count>=2]
what does the part [x for x,...] mean? also, shouldn't count be of type tuple as i suppose it is a counter item? how come this part count>=2
work?!
Note: I understand from debugging that the first line converts the list into a counter and the second one removes the items that occurred less than twice. but i can't really interpret the syntax