xxxxxxxxxx
try:
# code that might raise exceptions
pass
except (ExceptionType1, ExceptionType2, ):
# handling multiple exceptions
pass
xxxxxxxxxx
except (IDontLikeYouException, YouAreBeingMeanException) as e:
pass
xxxxxxxxxx
try:
except FirstException:
handle_first_one()
except SecondException:
handle_second_one()
except (ThirdException, FourthException, FifthException) as e:
handle_either_of_3rd_4th_or_5th()
except Exception:
handle_all_other_exceptions()
xxxxxxxxxx
string = input()
try:
num = int(input())
print(string+num)
except (TypeError, ValueError) as e:
print(e)