On Aug 22, 7:12 pm, Tim Chase wrote:
> On 08/22/10 12:50, Baba wrote:
>
>
>
> > level: beginners
>
> > I was trying to write simple code that compares 2 tuples and returns
> > any element in the second tuple that is not in the first tuple.
>
> > def tuples(t1, t2):
> > result = []
> > fo
On 08/22/10 12:50, Baba wrote:
level: beginners
I was trying to write simple code that compares 2 tuples and returns
any element in the second tuple that is not in the first tuple.
def tuples(t1, t2):
result = []
for b in t2:
for a in t1:
if b == a:
level: beginners
I was trying to write simple code that compares 2 tuples and returns
any element in the second tuple that is not in the first tuple.
def tuples(t1, t2):
result = []
for b in t2:
for a in t1:
if b == a:
break
else:
re