[Tutor] Is there a simpler way to remove from a set?

Leam Hall leamhall at gmail.com
Fri May 7 10:25:16 EDT 2021


On 5/7/21 9:57 AM, Mats Wichmann wrote:

> To take Alan's reply down to an even shorter one:
> 
> The "simpler way" is to not add entries that don't qualify, then you 
> have nothing to remove.  That requires a slightly different way of 

> thinking about your code.
> 
> There is, however, nothing wrong in general with using set operations 
> like you do to remove unwanted entries from a set.

Agreed. I was trying to figure out how to iterate through the exclude 
list as the full list was gone through, but couldn't figure out how. 
Still processing it, mentally.

Leam

-- 
Site Reliability Engineer  (reuel.net/resume)
Scribe: The Domici War     (domiciwar.net)
General Ne'er-do-well      (github.com/LeamHall)



More information about the Tutor mailing list