BlackRock interview question

Reverse a linked list in python