python assers

The assert keyword is used when debugging code.

The assert keyword lets you test if a condition in your code returns True, if not, the program will raise an AssertionError.

You can write a message to be written if the code returns False, check the example below.

Here is what the above code is Doing:
1. We start by defining a function, test_input, that takes two parameters, actual_result and expected_result
2. We use the assert keyword to check if the expected_result is the same as the actual_result
3. If the assert condition returns True, nothing happens and the program continues to run
4. If the assert condition returns False, the program will raise an AssertionError and print the message provided