On Sat, Jul 1, 2017 at 5:45 AM, Ho Yeung Lee <jobmatt...@gmail.com> wrote:
> just want to compare tuples like index (0,1), (0,2), (1,2) without > duplicate > such as (2,0), (1,0) etc > > I'm going to assume that the order of values in the tuple is important to you. If so, you can simply use the `==` operator to compare them. For instance: ``` a = (0, 1) b = (0, 1) a == b >>> True a = (1, 0) b = (0, 1) a == b >>> False ``` Using the `is` operator will return `False` as a and b are completely independent objects. ``` a = (0, 1) b = (0, 1) a is b >>> False ``` -- https://mail.python.org/mailman/listinfo/python-list