filter mased on value in a tuple in a list code example
Example: filter list of tuples python
>>> filter(lambda x: x[0].startswith('img'), l)
[('img-1', 'iii'), ('img-2', 'jjj')]
>>> filter(lambda x: x[0].startswith('img'), l)
[('img-1', 'iii'), ('img-2', 'jjj')]