IDs de objeto da lista Python

# assuming obj has an attribute id
list = [obj1, obj2, obj3]

ids = [obj.id for obj in list]
Black Beaver