Use set comprehension to generate module list

set are faster when we need to do item lookup.