retain_all_copy
Returns a new set whose elements are those found in both this set and the given collection, or in other words, the intersection of this set and the given collection.
Return
a new set whose elements are the intersection of this set and the given collection
a.retain_all_copy(b) is equivalent to a & b, where a and b are sets.
Examples:
set([1]).retain_all_copy(set([1]))returnsset([1])set([1]).retain_all_copy(set([2]))returnsset([])set([1, 2, 3]).retain_all_copy(set([2, 3, 4]))returnsset([2, 3])
Since
0.14.16
Parameters
values
the other collection