R.B.
10-25-2008, 02:16 PM
Hi there,
I'm stuggling to get my head around a problem and was wondering if someone was able to help.
I have a list of tuples (each tuple with two ints), and a seperate tuple consisting of two ints. When any of the ints from the first list matches either of the ints from the lone tuple, I want the whole tuple (two ints) returned.
That's a terrible explaination, so here's an example to clarify:
[(2,2),(6,5),(6,6),(2,5),(3,1)] ..... the list of tuples
(5,3)..... the lone tuple
So with these inputs, the function I need would return (6,5) and (3,1).
Any thoughts?
I'm stuggling to get my head around a problem and was wondering if someone was able to help.
I have a list of tuples (each tuple with two ints), and a seperate tuple consisting of two ints. When any of the ints from the first list matches either of the ints from the lone tuple, I want the whole tuple (two ints) returned.
That's a terrible explaination, so here's an example to clarify:
[(2,2),(6,5),(6,6),(2,5),(3,1)] ..... the list of tuples
(5,3)..... the lone tuple
So with these inputs, the function I need would return (6,5) and (3,1).
Any thoughts?