Created
April 8, 2014 11:47
-
-
Save sanfx/10113339 to your computer and use it in GitHub Desktop.
if ther is not exception then else block will execute, but if error occurs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value = None | |
try: | |
print "in try" | |
value = int(input()) | |
print "No Error Occured" | |
except: | |
print "In Except: Value: %s" % value | |
else: | |
print "In else: Value %s" % value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment