Swap the Bookends — medium Python Fundamentals problem | Incognition