Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: Using Exceptions

Python: Using Exceptions
{filelink=16545}

a=[3, 4, 0, 8, 2, 11, 0, 18]
for x in a:
    try:
     print "%f"%(5/x)
    except ZeroDivisionError:
        print "divide-by-0 exception"

Users who found this page were searching for:

  • java getstring+language+
  • python search for a string in a file and return number of occurrences in the file
  • how to print out a copied message in java
  • perl count file lines
  • javamail gmail pop3 example
  • java "%tt"
  • java program for checksum in netwoking
  • program for checksum in java in networking

No comments yet.

Leave a Comment