Errors are unavoidable. As a developer, we always have to encounter multiple errors in the initial phase of development. And at the end of the development, the business logic/application which we developed should not misbehave or terminate due to some unexpected events during execution.
In General, Errors in python can be of two types
- Syntax Errors/Compile Time Error - Syntax mistakes which result in termination of the program.
#syntax error example
a = 5
if(a)
print("Value present")
#result
File "main.py", line 2
if(a)
^
SyntaxError: invalid syntax