Reversing a linked list is turning each node's next link back to the node before it. The only hard part is the order: the moment you turn a link you lose the way to the rest of the chain. So before turning it you set the next node aside.
previous = Nonenode = headwhile node is not None:following = node.nextnode.next = previousprevious = nodenode = followingreturn previous
previous on, move node on. When the loop ends node is empty; the head of the reversed list is in previous.This is a building block of larger solutions. To tell whether a chain is a palindrome without copying it into a list: find the middle with the fast and slow pointers, reverse the second half, then walk the two halves together from their starts, comparing.