i wanna represent a set of two int values as one value, so i can have:
x = f(a,b) = f(b,a)
so x should not represent more than one set.
Any help please.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
frozensettype is hashable, and you can create one from any iterable. To get the hash value, just use the built-inhashfunction: