Broadcom interview question

Reverse a linked list in Python