News for hackers. Stuff that matters.
Re:Show HN: Refurb – A tool for refurbishing and modernizing... by driggs on Wednesday September 28, 2022 @11:06AM (#33008856)
You are confusing the two different uses of `in`. There's no reason to use a set for a temporary iteration container; but using a set is ideal and - in theory, for large n or expensive equality check - more performant as a temporary containment container:

  if x in {1, 2, 3}:
      print(x)

There are no comments on this comment yet.