What is the syntax to return the maximum value in a list?

max(<list name>)
#examples
>>> nums = [1,2,3,4,5]
>>> max(nums)
5

>>> letters=['A','B','F','Z']
>>> max(letters)
'Z'

 

Advertisements