Skip to content

Lists · routine

The largest number

Write largest(nums) returning the biggest number in a non-empty list, without max().

Run adds print(largest([-4, -2, -9])) after your code, to try it.

Stuck on the idea rather than the code? The Lists lesson walks through it.