Finding a tuple in a tuple
bg_ie at yahoo.com
bg_ie at yahoo.com
Thu Feb 22 03:59:29 EST 2007
Hi,
Lists say I have the following tuple -
t1 = ("ONE","THREE","SIX")
and then the following tuples -
t2 = ("ONE","TWO","THREE")
t3 = ("TWO","FOUR","FIVE","SIX")
t4 = ("TWO",)
t5 = ("TWO","FIVE")
What I want to do is return true if any member of tuple t1 is found in
the remaining tuples.
Therefore -
2) ("ONE","TWO","THREE") : TRUE
3) ("TWO","FOUR","FIVE","SIX") : TRUE
4) ("TWO",) FALSE
5) ("TWO","FIVE")
How do I do this?
Cheers,
Barry.
More information about the Python-list
mailing list