Q:

Use list comprehension with a double loop to append values based on conditions

Here is my first code example.  How do I accomplish this using list comprehension? 
for c in c_list:
    c_id_list.add(c.id) 

Can I use list comprehension to accomplish this?
for c in c_list:  
    c.p_list = []
    for p in p_list:
        if p.c_id == c.id:
            c.p_list.append(p)

A:

1.
c_id_list = [c.id for c in c_list]

2.
for c in c_list:  
    c.p_list = [p for p in p_list if p.c_id == c.id]

