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
Published on 23-Feb-2018 10:21:18
Advertisements