What are the different types of Errors in Python?

Errors are the problems in a program due to which the program will stop the execution. On the other hand, exceptions are raised when some internal events occur which changes the normal flow of the program.

Two types of Error occurs in python.

  • Syntax errors: When the proper syntax of the language is not followed then a syntax error is thrown.

  • Logical errors (Exceptions): When in the runtime an error that occurs after passing the syntax test is called exception or logical type.