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

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: 2020-02-21T12:27:17+05:30

245 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements