Deviopath › Python

Largest Item Without max()

Easy · Lists

A common pattern: remember the best value seen so far, then walk through the list and update it whenever you find something bigger. Start with the first item, not with 0, or lists of negative numbers will break.

Write a function biggest(numbers) that returns the largest number in a non-empty list, without using max().

Next: Average Score