You're testing the exceptions incorrectly. Your code isn't checking what exception is thrown.
Exception == ZeroDivisionError is comparing if those two classes are the same. They aren't though, so that will always result in False. You want something closer to:
try:
b = 2/0
print(b)
except Exception as e: # e is the thrown exception
if isinstance(e, ZeroDivisionError):
print("lol")
else:
print(Exception)
Doing manual type checks like this isn't great though if it can be helped. This would be better by having two excepts:
try:
b = 2/0
print(b)
except ZeroDivisionError:
print("lol")
except Exception:
print(Exception)
Although, in most cases, you don't want to catch all Exceptions unless you need that functionality for logging purposes.