Meta interview question

python linked list and reversal