[Tutor] Confusion about definition of proper subset in python set
Cameron Simpson
cs at cskk.id.au
Fri Oct 30 19:35:55 EDT 2020
On 30Oct2020 17:14, boB Stepp <robertvstepp at gmail.com> wrote:
>I think that he is referring to:
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>issubset(other)
>set <= other
>Test whether every element in the set is in other.
>
>set < other
>Test whether the set is a proper subset of other, that is, set <= other
>and set != other.
Hmm, yes. It is even the text he cites.
Manprit, the second definition says that the two conditions hold ("<=
and !="). It does not imply that it is possible for these two conditions
to hold: "= and !=". They didn't write "< and !=" because "<" is what
that entry is defining.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list