Hi,
I want to find a item within a large tuple that contains tuples.
mytuple = (('name',123,'value'),('first',345,'newvalue'))
so a 'for loop' works
istrue = False
for i in range(len(mytuple)):
  if 'first' in mytuple[i]:
      istrue = True
      break
if istrue:
  print " true"

Is possible to use a generator or list comp.  All I want to know is it True or 
False that mytuple contains 'first'.
-- 
John Fabiani
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to