NatWest Group Interview Question

What is the purpose of the 'with' keyword in Python?