I have two lists as below
tags = [u\'man\', u\'you\', u\'are\', u\'awesome\']
entries = [[u\'man\', u\'thats\'],[ u\'right\',u\'awesome\']]
The appropriate LC would be
[entry for tag in tags for entry in entries if tag in entry]
The order of the loops in the LC is similar to the ones in nested loops, the if statements go to the end and the conditional expressions go in the beginning, something like
[a if a else b for a in sequence]
See the Demo -
>>> tags = [u'man', u'you', u'are', u'awesome']
>>> entries = [[u'man', u'thats'],[ u'right',u'awesome']]
>>> [entry for tag in tags for entry in entries if tag in entry]
[[u'man', u'thats'], [u'right', u'awesome']]
>>> result = []
for tag in tags:
for entry in entries:
if tag in entry:
result.append(entry)
>>> result
[[u'man', u'thats'], [u'right', u'awesome']]
EDIT - Since, you need the result to be flattened, you could use a similar list comprehension and then flatten the results.
>>> result = [entry for tag in tags for entry in entries if tag in entry]
>>> from itertools import chain
>>> list(chain.from_iterable(result))
[u'man', u'thats', u'right', u'awesome']
Adding this together, you could just do
>>> list(chain.from_iterable(entry for tag in tags for entry in entries if tag in entry))
[u'man', u'thats', u'right', u'awesome']
You use a generator expression here instead of a list comprehension. (Perfectly matches the 79 character limit too (without the list call))