> [ manager.name for manager in set([
person.manager for person in employees
])]
?
I assume with something like set() or unique() you need to create the intermediate iterable anyway, but without it I have trouble finding an example where doing a single list comprehension wouldn't suffice.
Do you mean something like
> [ manager.name for manager in set([ person.manager for person in employees ])]
?
I assume with something like set() or unique() you need to create the intermediate iterable anyway, but without it I have trouble finding an example where doing a single list comprehension wouldn't suffice.