I've been using the two interchangably. It depends on the order. If you
have an element e and a set S, then you can test if "e in S" or "S
contains e". They are both the same operation, but expressed in terms of
the element first or the set first.
rb
On 12/05/2015 08:25 AM, Flavio Pompermaier wrote:
Hi Ryan,
second question: actually I need more the 'in' wrt 'contains' (contains
for me means to check wheter ONE element is contained in a list, while 'in'
could be expressed also as a sequence of OR'ed contains).
Thus, I don't know which operator is better to implement first, in terms of
performance and implementation complexity. What do you suggest?
--
Ryan Blue
Software Engineer
Cloudera, Inc.