human
python - iterating over a subset of a list of tuples
assistant
Here is some code to get all the items from a list of tuple 'l' where second item in tuple is '1'.

[x for x in l if x[1] == 1]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.