get list item by attribute in python,items = [item for item in container if item.attribute == value]