Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python Python Program to Catch Multiple Exceptions in One Line

string = input()

try:
    num = int(input())
    print(string+num)
except (TypeError, ValueError) as e:
    print(e)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #Python #Program #Catch #Multiple #Exceptions #One #Line
ADD COMMENT
Topic
Name
4+1 =