human
Get list item by attribute in Python
assistant
Here is some code to get a list of items in the list `container` with attribute equal to `value`

items = [item for item in container if item.attribute == value]

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