finally - Used with exceptions, a block of code that will be executed no matter if there

The finally keyword is used in conjunction with the try keyword and except keywords.  Regardless of the exception, the code in the finally block will always run.

Example

Python
def divide(n, d):
    try:
        result = n / d
    except:
        print("Oops, dividing by 0!")
        result = float('inf')
    finally:
        print(f'Result = {result}')

print('6 / 2:')
divide(6, 2)
print('10 / 0:')
divide(10, 0)

Output

6 / 2:
Result = 3.0
10 / 0:
Oops, dividing by 0!
Result = inf

Notice how the code in the finally block is always run.