tuoheng_algN/vodsdk/test/内置函数/test.py

12 lines
246 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# key参数表示使用指定的方法来比较大小而不是使用原数据比较大小
x = (2, 3, 4, 5)
print(max(x))
print(max(x, key=lambda z: 1 / z))
############################### collections #################################