2Qs

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sat Jun 24 23:03:08 CEST 2006


SuperHik, for the second question there is builtin sum():

>>> values = 10.5, 5, -12
>>> sum(values)
3.5

Your if becomes:

if x>10 and y>10 and z>10 and sum(tritup(x,y,z)):
    print "OK"

Bye,
bearophile




More information about the Python-list mailing list