Post

PythonPython

c
cayrel rings

Posted on 28th February 2024|17 views

0
votes

Python Catch Multiple Exceptions

How can I catch multiple exceptions in one line?

Answers
P
Harshel Mike

Posted on 28th February 2024

try: 

can_raise_any_errors(): 

except (SomeErrorOne, SomeErrorTwo) as errr: 

 

handle(errr)

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos