> for i in data[0]: # Iterate over elements of the tuple
> if i > 5:
> print "greater"
> else:
> print "lesser"
>
> `value` in your code does not mean the index, it's the actual element
> itself.
It is unsaid rule that variables i, j and k are used for loop indexes.
It is confusing if you use them for other values, esp. in loops.
This reads better:
for x in data[0]:
if x > 5:
print "greater"
else:
print "lesser"
Anand
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers