S&P Global Interview Question

reverse a list