try catch exception python without return code example
Example 1: python try without except
try:
print('try to print this')
except:
pass #do nothing
Example 2: python catch any exception
try:
do_something()
except:
print "Caught it!"