My situation is a dictionary with tuple key I think dictionary.values()[index] Is correct
On Sun, 2 Jul 2017 at 12:48 AM, Pavol Lisy <pavol.l...@gmail.com> wrote: > On 7/1/17, 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 > > > > > > On Saturday, July 1, 2017 at 7:00:17 PM UTC+8, Peter Otten wrote: > >> Ho Yeung Lee wrote: > >> > >> > finally i searched dict.values()[index] solved this > >> > >> That doesn't look like a good solution to anything -- including "this", > >> whatever it may be ;) > >> > >> If you make an effort to better explain your problem in plain english > >> rather > >> than with code examples you are likely tho get better answers. > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > [(i, j) for j in range(3) for i in range(j)] # is this good for you? > -- https://mail.python.org/mailman/listinfo/python-list