Answers for "python list object ids"

0

python list object ids

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

ids = [obj.id for obj in list]
Posted by: Guest on April-30-2021

Code answers related to "python list object ids"

Python Answers by Framework

Browse Popular Code Answers by Language