You can use pass in the except clause to ignore an exception as shown in following example:
try:
print(invalid-variable)
except Exception:
pass
print("Exception ignored")
OUTPUT:
Exception ignored
I recommend enrolling in this Python Certification Course by Intelllipaat to learn Python.
You can watch this Exception Handling in Python: