Minor point but you don't need the square brackets here as set() can take a generator.