"sunil tech" <sunil.tech...@gmail.com> wrote
i have d=[{'qty':0.0},{'qty':0.0}]
when all the qty is 0.0,
i want to perform some print operation
(only at once, after it checks everything in the list of dictionary
'd')...
if its not 0.0,
print some message...
Just so I'm clear on the requirement you want something
like:
isZero = True
for each dictionary in d
if dictionary[qty] is not 0.0
print some message
isZero = False
if isZero:
some print operation
If so that should be easily translated into Python?
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor