Get a list of object properties from list of objects in python
Question: I will give you my specific example but this is a general python question.

I have a list of apscheduler job objects
[Link](http://packages.python.org/APScheduler/modules/job.html) I am trying to
figure out what is the most efficient way to get a list of the apscheduler job
property, 'kwargs' from my list of apscheduler jobs.

I know I can just iterate through the whole list and make a new list of
kwargs, but I was wondering if there is a more efficient/ cleaner way to do
this in python, since I am new to it. Thanks!

    
    
    from apscheduler.scheduler import Scheduler
    
    schedule = Scheduler()
    jobs = schedule.get_jobs() #jobs is a list of apscheduler jobs
    jobs_kwargs = ???
    


Answer: Well, you pretty much said it:

    
    
    jobs = schedule.get_jobs()
    jobs_kwargs = [j.kwargs for j in jobs]
    

As far as I know, there's really no "cleaner" way than that.

