Styrow.dev
Question 80 of 99

How will you handle exception in python?

Question

How will you handle exception in python?

Answer

try, except and finally key word is used to handle the exception try: #code except: #catches the exception finally: #executes the block whether any exception is raised or not.