You can ignore exceptions with contextlib.suppress and in this article I show why this is preferred over try: ... except: pass.
contextlib.suppress
try: ... except: pass
Maths is an art.