lundi 13 juillet 2020

When do we need to use " try, except" in python? Is it similar to "if, else"?

try: 
  print(x)
except:
  print("Done!!")

Why do we need to use, try and except.

Can someone explain try and except method? Could you answer with an example and explanation.

Aucun commentaire:

Enregistrer un commentaire