On Thu, 27 Apr 2017 11:49:55 +0200
Peter Otten <__pete...@web.de> wrote:


> I'd like to bring to your attention the discard() method
> 
> >>> s = {1, 2, 3}
> >>> s.discard(int(v))
> >>> s
> {2, 3}
> 
> which allows you to avoid building the throwaway single-entry set.

Thank you Peter. I have been using the remove() method which, by the look of 
it, may do the same thing as discard(). I'll have a play and see.

-- 
Regards,
Phil
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to