Discuss / Python / 练习

练习

Topic source

xian_wen

#1 Created at ... [Delete] [Delete and Lock User]
def findMinAndMax(L):
    if not L:
        return None, None
    return min(L), max(L)

看到最精简的答案,厉害

这是自作聪明, 要你迭代写法。

假如让你写第二,第三大的怎么办。

凡响skyline

#4 Created at ... [Delete] [Delete and Lock User]

厉害个p,自作聪明,调用内置的函数还要你写干嘛


  • 1

Reply