How to catch a specific Exception when we don't know the Exception?

When I learn this section from Intermediate Python 3, I have a small confuse.

This is the course link**include a link**

Here’s a simplistic example. Not sure if this is what you’re after.

my_int = "seven" try: my_sum = 13 + my_int print(my_sum) except Exception as e: print(e)
1 Like