How to find the greatest number in a list of numbers in Python?


Python's built-in library function max() returns the largest number in an iterable or commaa separated list of numbers.

>>> max(10,23,43,21)
43
>>> l1=[4,7,2,9,1]
>>> max(l1)
9

Updated on: 21-Feb-2020

159 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements