A linked list is a chain of nodes, each carrying a value and a link to the next one. It differs from a Python list in this: there are no indices and the length is written nowhere. All you hold is the first node (head); you get to the rest by following the next links. The last node's next is None.
largest = head.valnode = head.nextwhile node is not None:largest = max(largest, node.val)node = node.nextreturn largest
head and moves on with node = node.next until it is None. Every one-pass pattern you know from lists (counting, summing, carrying the best) fits inside this loop unchanged.The chain's strength is inserting and removing in the middle: changing two links is enough, and no element is shifted. Its weakness is finding things: getting to the k-th element takes k steps of walking.