beginner's python help

hrishy hrishys at yahoo.co.uk
Sun Sep 6 09:54:42 CEST 2009


Hi

sum = 0
 for item in readData:
     try:
         sum += int(item)
     except ValueError:
         print "Oops!  That was no valid number. Instead it was:", item

So you mean to say this would ignore the bad data and continue processing ?

regards


      



More information about the Python-list mailing list