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

PythonServer Side ProgrammingProgramming

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
raja
Updated on 21-Feb-2020 12:27:17

Advertisements