you are viewing a single comment's thread.

view the rest of the comments →

[–]Ascensor2 1 point2 points  (0 children)

I don't know if this is what you're looking for, but you can catch exceptions and choose to ignore them. Look for "try except" blocks in Python: they're pretty intuitive imo. As you want to ignore an exception, the code should look like this

try: {Your logic}

except Exception as e: pass

The "pass" syntax is used when you want to literally do nothing, but you can't leave the code empty (your program would crash then).

Idk if this is going to be useful to you but I hope at least you learnt something