Skip to content
Rob Nagler edited this page Aug 23, 2022 · 3 revisions
  • in consumes an iterable:

For user-defined classes which do not define __contains__() but do define __iter__(), x in y is True if some value z, for which the expression x is z or x == z is true, is produced while iterating over y.

[private note https://github.com/radiasoft/discuss/issues/14]

Clone this wiki locally