297 · 寻找最大值

描述
寻找 n 个数中的最大值。

保证列表里的所有数字都在 int 范围内。

样例
样例 1:

输入:[1, 2, 3, 4, 5]
输出:5

class Solution:
    """
    @param nums: the list of numbers
    @return: return the maximum number.
    """
    def maxNum(self, nums):
        return max(nums)
原文地址:https://www.cnblogs.com/bernieloveslife/p/14634908.html